Re: [PHP] javascript in head or in body ?

2007-08-07 Thread tg-php
Ok, you got the obligatory 'wrong list' comments. It is the wrong list, but for the sake of public completeness... how about an answer to the question. You can put it anywhere but a couple of considerations: 1. I believe if you put it AFTER where the JS functions defined in that block are

Re: [PHP] Which PHP-Editor to use?

2007-08-02 Thread tg-php
The age old question... is it that time of the year again already? Some reviews and lists: http://www.php-editors.com/ I've used Zend Studio for years, and really like it, but lately I've gotten tired of the java virtual machine seeming to hog tons of system resources. I've also used Crimson

Re: [PHP] Loss of precision in intval()

2007-08-01 Thread tg-php
Very weird and counter intuitive. Looking at the php manual, I see this: Converting to integer from floating point: When converting from float to integer, the number will be rounded towards zero. But you'd think the multiplication would happen before the rounding. if you do: $a = ceil(75.82

Re: [PHP] Loss of precision in intval()

2007-08-01 Thread tg-php
Probably return 7582 instead of 7581. = = = Original message = = = On 8/1/07, Mark Summers [EMAIL PROTECTED] wrote: This sort of thing really isn't helpful... ?php $a = 75.82 * 100; echo intval($a); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Reading registry values

2007-07-30 Thread tg-php
I'm not sure that there's actually anything you'd need to access in the server registry (and certainly no registry in Linux if you're also transitioning from Windows to Linux). And depending on what the ActiveX control your ASP pages accessed actually does, it may be better to recreate it in

Re: Re[2]: [PHP] Reading registry values

2007-07-30 Thread tg-php
Yeah, that could be one thing that the ASP/ActiveX combo need to access the registry for.. but if he's replacing ASP with PHP and if the ActiveX control doesn't do anything he can't re-create in PHP, then there's no need to verify that anything relating to ASP or ActiveX is registered and

Re: [PHP] Re: what trick is this? How to do it?

2007-07-13 Thread tg-php
View the source and trace through the javascript. Looks like it has to do with: function openLogin() Which calls: dojo.require(dojo.widget.Dialog); and.. floatingWindow = dojo.widget.createWidget(Dialog, properties, node); and.. floatingWindow.setContent(iframe (bunch of stuff)/iframe);

Re: [PHP] Small LAMP install/distro

2007-06-22 Thread tg-php
First, funny that you say that from a Gmail account, where top-posting is encouraged by the mail system. Second, and not to get into a big discussion about top vs bottom posting, but I top-post because typically if I'm involved in a conversation, I know what's been said already and don't want

Re: [PHP] Small LAMP install/distro

2007-06-22 Thread tg-php
Excellent information Jim! Thanks a ton! I really wish I knew linux more intimately so I knew what was a vital organ and what was an appendix :) Your suggestions sound like exactly what I'm looking for. Greatly appreciated! Actually.. one question. Won't it try to set up a swap partition?

RE: [PHP] Small LAMP install/distro

2007-06-22 Thread tg-php
Thanks for the suggestions.. but again, the question wasn't what distro of linux to use. And I don't mind upgrading things. The question is what would someone recommend for a really small distro of linux preferably with the bare essentials + apache, mysql, php and samba. Failing that, I'll

Re: [PHP] Small LAMP install/distro

2007-06-22 Thread tg-php
Thanks again for the info, Jim. will look into the 'install to flash drive' information. Technically that's not what I'm doing, just want to store the virtual machine on the flash drive, but the installation instructions should be tight enough to be pertinent still. I think you got close

Re: [PHP] Small LAMP install/distro

2007-06-22 Thread tg-php
logic is subjective. When I read Because it breaks the logical sequence of discussion., I already knew what you were talking about without having to read the question.. because I knew what was being discussed in this thread. If it wasn't an answer to my original question, then it was about

[PHP] Small LAMP install/distro

2007-06-21 Thread tg-php
Ok, done all my googling and experimenting, now I'm tossing it to you guys. Can anyone recommend a small, no frills, LAMP-centric linux package/distro? What I'm doing is setting up a test/development environment in a VMWare virtual machine to keep things all nice and comparmentalized. It's

Re: [PHP] Small LAMP install/distro

2007-06-21 Thread tg-php
Yeah, I took a quick look at Damn Small Linux. And have been playing around with Puppy Linux (which is pretty cool too). I may end up using one of those. Wanted to see if there was a distro with everything built into it already (Damn Small seems to have a lot of average user apps and not

RE: [PHP] Small LAMP install/distro

2007-06-21 Thread tg-php
Yeah.. I'm aware. As I stated in my original email: Ideally I'd like to keep using my traditional Windows apps to do development... I'm comfortable moving around in linux, but the tools and OS I choose to use are all Windows-centric. But instead of installing Apache and PHP and MySQL on my

RE: [PHP] Date

2007-06-20 Thread tg-php
Don't forget that in cases like the one below, you can use the list() function to tighten things up a bit: $start_date='2007-06-20'; list($start_year, $start_month, $start_day) = explode('-',$start_date); I prefer using the date functions that some of the other people mentioned and only use

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread tg-php
Could try something like this: $types = array('T', 'D', 'L'); if (in_array($type, $types)) { // do something } But that's going to just check to see if $type is one of the valid types you're looking for. You might try something like switch. switch ($type) { case 'T': // Output 'T'

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread tg-php
double pipes constitutes an OR operation. You can use the keyword OR as well. Also, and AND are the same as well. http://us.php.net/manual/en/language.operators.logical.php -TG = = = Original message = = = Excellent! Double pipes to seperate possible multiple variable values. lock in

Re: [PHP] convert numerical day of week

2007-05-22 Thread tg-php
Mom! Dad! Stop fighting! = = = Original message = = = On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote: Yours is the least maintainable. Hehe.. with 4 times as many lines of code and 160% more bytes of code overall? cat locale.php|grep -v ^$|wc -l 16 cat simple.php|grep -v

Re: [PHP] PHP debugger

2007-05-15 Thread tg-php
Don't know if it'll do what you want it to do...and if you're using Joomla, it might be tricky (or not... havn't messed with Joomla enough to know) to insert it into the system in a meaningful way.. but check out this: FirePHP: http://www.firephp.org/ Works with Firebug Firefox extension to

Re: [PHP] PHP sorting csv array output

2007-05-10 Thread tg-php
When you load your data into your array, you can use the timezone (or whatever field you're using to sort) as the array key, then use ksort(). Check the see also for a bunch of other types of sorting you can do. When it comes to the multisorts and user defined sorts, I'm at a bit of a

Re: [PHP] move if logic from php into query

2007-04-27 Thread tg-php
In my data scrubbing function, I pass it a content type (phone, city, SSN, etc), do whatever scrubbing/filtering I'm going to do on that type of content, then after everything's done, then I do the mysql_real_escape_string() on it and return that to where the function was called. That way,

RE: [PHP] PHP excel capability

2007-04-23 Thread tg-php
I had some issue when I tried CSV in the past. I don't know if there was some issue with use of commas in the data and not getting Excel to properly use some data, with commas, some more data so that it'd omit the quotes as well or what. In the end, for the quick and dirty throwaway project I

Re: [PHP] CSS vs. Tables OT OT OT OT OT OT OT OT OT OT

2007-04-18 Thread tg-php
Mom! Dad! Please don't fight! = = = Original message = = = On Tue, 2007-04-17 at 22:04 -0500, Larry Garfield wrote: On Tuesday 17 April 2007 9:54 pm, Robert Cummings wrote: You say Using tables for layout *is* a hack. Unfortunately for you tables were intended for laying out tabular

RE: [PHP] PHP excel capability

2007-04-18 Thread tg-php
Or, even better and more useful: http://pear.php.net/package/Spreadsheet_Excel_Writer It's not perfect, but it does the basic job. Also, if you output an HTML table and set the content type in your header to an Excel content type, it should ask the client PC to open the page in Excel

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread tg-php
Couple of questions come to mind... 1. How big is this template that you're loading? Not sure why almost any HTML file would take up 300+ meg of memory when loaded into a variable. Are you loading images and other content in as well or just the HTML file? 2. Replacing the placeholders with

Re: [PHP] Download multiple sound files?

2007-04-12 Thread tg-php
Stut beat me to it... downloading multiple files at once is probably best done with compressing them and just downloading the one file. You could possibly rig a situation where the user downloaded one file, then a certain number of seconds later, the page redirects to the next file to

Re: [PHP] Download multiple sound files?

2007-04-12 Thread tg-php
Does this mean we need to start lobbying against connectionless protocols like HTTP so we can better download multiple files? hah And POP3 probably existed long before the old BBS', so it's not that things got LESS efficient, it's just that we didn't NEED to bundle bunches of emails together

Re: [PHP] Array remove function?

2007-04-10 Thread tg-php
Unset works, but if he's trying to do a search and remove in one function, unset is a step removed from that criteria (missing the 'search' part). Looking at the array functions, I see some potential. # array_remove(array(1=2,2=3),2,true); // array (2=3) // Keep all but where values = 2

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread tg-php
In addition to the suggestions made, check out opendir() too. It may be a little simpler for what you're doing. Not sure. Remember, the beauty of PHP is that there's almost always a fuction or two already made that do what you want. Even some semi-obscure stuff. So always scan through the

[PHP] OT Apologies.. Re: [PHP] Firefox and Crafting Tables

2007-04-10 Thread tg-php
Just glad this wasn't my grociey list or something worse. hah.. sent to the wrong address, my apologies. But for anyone looking for some good tradeskill craft recipe lists for World of Warcraft or for ways to help their Firefox be a little nicer on memory usage, there ya go. *shame* -TG =

Re: [PHP] mysql if empty

2007-04-10 Thread tg-php
Turn on MAGIC QUOTES and REGISTER GLOBALS Once you've done that, install Postgres. Run your MySQL command again, Postgres has much better error reporting and will assist in debugging the situation. You might consider replacing your javascript functions with PHP ones since JS can sometimes

Re: [PHP] mysql if empty

2007-04-10 Thread tg-php
Top-posting is sublime. Embrace it. Why scroll through 10 pages of emails you've already read when you can get to the meat of it all in the first few lines of an email? :) Plus trying to quickly separate all the previous replies from the latest one when some emailers indent, indent with

Re: [PHP] Sense last record

2007-04-09 Thread tg-php
Sorry, I only saw the one response to this question so not sure if what I'm going to propose was already mentioned and wouldn't work. Two things come to mind.. first, it looks like blocoTextoLast just has different margin settings, I assume because it's located on the right side of the page

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread tg-php
I think you're probably doing what almost all of us have done. Get an idea, see PHP as a potential solution and decided to just dive right in. I don't think many people start out in a classroom style Hello World situation and build slowly onto that. I'm sure other people have better starter

Re: [PHP] mixture of GET and POST

2007-04-03 Thread tg-php
As mentioned, this isn't a PHP issue really, except a little bit on the receiving end. Why not use multiple 'submit' buttons instead of using HREF links? input type=submit name=action value=Add input type=submit name=action value=Edit input type=submit name=action value=Remove In PHP, you'd

Re: [PHP] Alternative/Addition to using a CAPTCHA

2007-03-30 Thread tg-php
I agree with Tijnema on the fact that visual positioning doesn't really matter to the bots. They don't really see the page the way we see it. Most tricks you're going to try using HTML and JS are going to be readable by a bot. You could take your example and replace the alert() with a

Re: [PHP] Re: Alternative/Addition to using a CAPTCHA

2007-03-30 Thread tg-php
Maybe I'm missing something.. if the intent is to have 'hidden' fields that a user would end up submitting but a bot wouldn't.. that wouldn't work very well. A bot could easily see the hidden fields and submit them along with whatever other data they were sending. If the intention is to

Re: [PHP] Alternative/Addition to using a CAPTCHA

2007-03-30 Thread tg-php
hah.. I was going to let this discussion die a bit because a lot of it is fairly off-topic. But here and there we've hit on some PHP specific topics. I just had to say Kudos to tedd for providing a fairly interesting and possibly very functional CAPTCHA solution. True, a simple blue dot could

Re: [PHP] Re: Alternative/Addition to using a CAPTCHA

2007-03-30 Thread tg-php
Ah ok.. that makes a bit more sense. Even still.. anyone who's going out of their way to program a bot to defeat your specific CAPTCHA mechanism will probably notice the failure in testing. Unless you made a failure behave similar to a success but put them in a situation where ultimately they

Re: [PHP] Form Handler Script Security Discussion

2007-03-29 Thread tg-php
Good topic. It's touched on here and there in other questions, but always good to hit it head-on from time to time too. First, mysql_real_escape_string() for inserting into MySQL and whatever equiv you can find for whatever other database you may be using. addslashes() isn't so hot for

Re: [PHP] Form Handler Script Security Discussion

2007-03-29 Thread tg-php
You can pass session ID data via the URL. Ugly as it is, that's a viable option (that I see used a lot actually.. kinda drives me nuts but I understand it) for when you don't have people logging in and/or can't guarentee that cookies will be available. As was mentioned a few times, CAPTCHA

Re: [PHP] Audio CAPTCHA review request

2007-03-29 Thread tg-php
It played the same sequence for me when I re-clicked the Play button.. until I went away for a min or two and my session probably timed out. Did it not play the same sequence for you? -TG = = = Original message = = = Just a really quick check right now is all I have time for, but it looks

Re: [PHP] Audio CAPTCHA review request

2007-03-29 Thread tg-php
Not bad. Seems to work nicely. No OMGWTF! obvious slips like naming the MP3 with the digits the user needs to enter. Worked fine in Firefox 1.5 too. Sometimes when audio is embedded in a page, it tries to load Windows Media Player or something which doesn't always work well in Firefox without

Re: [PHP] PHP 5.2.1: Some scripts are being parsed, but most aren't

2007-03-28 Thread tg-php
I've seen an issue similar to this a few times recently. It involved a phpBB board I log onto periodically. It seems that the server is really slow and after what seems to be a timeout period, sometimes I'll get a download request in Firefox. If I let it download, I get an empty file. I

RE: [PHP] Getting Similar rows from db

2007-02-23 Thread tg-php
I don't think there's a way to do it with SQL in MySQL. Jay's talking about a substring search within a field and what you really want is to know if two whole rows (multiple columns) within a database are similar or not. You could pull in all the data and use PHP to figure out what's similar

Re: [PHP] WHERE problem

2007-02-20 Thread tg-php
Different strokes for different folks... Might I toss a new recommendation into the mix? SELECT text FROM fortunes ORDER BY RAND() LIMIT 1; = = = Original message = = = N~~meth Zolt~~n wrote: 2007. 02. 20, kedd keltez~~ssel 08.17-kor Jim Lucas ezt ~~rta: Mike Shanley wrote: I'd like to

RE: [PHP] WHERE problem

2007-02-20 Thread tg-php
Ah.. sorry Jay. I had like 8,000 emails today and must have missed some of the original responses. Or maybe I'm just trying to look smart by riding on your coat-tails. Either way, apologies for the repeated information. -TG = = = Original message = = = [snip] Different strokes for

Re: [PHP] print() or echo

2007-02-13 Thread tg-php
As referenced in the manual ( http://us2.php.net/manual/en/function.echo.php ), check out this url: http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 Short story, there is a difference, but the speed difference is negligable. If anyone cares, I prefer echo too. Not sure why. Shorter

Re: [PHP] print() or echo

2007-02-13 Thread tg-php
negligible.. blarg spelling. :) = = = Original message = = = As referenced in the manual ( http://us2.php.net/manual/en/function.echo.php ), check out this url: http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 Short story, there is a difference, but the speed difference is

Re: [PHP] how do I just escape double quotes within a string?

2007-02-13 Thread tg-php
You could use addslashes(): http://us3.php.net/manual/en/function.addslashes.php Or, the code you mentioned below, could be rewritten like: str_replace(\,\\,$code); or str_replace('','\',$code); And if you're doing it for a MySQL query call, then you want to use mysql-real-escape-string()

Re: [PHP] round to nearest 500?

2007-02-13 Thread tg-php
For downward rounding, you'd always want to use floor() and use ceil() for rounding up. round() rounds up on a 5, down on a 4 and below. Example: echo round(141.074, 2); // 141.07 echo round(141.065, 2); // 141.07 I thought round() (or maybe it was a rounding function in another language or

RE: [PHP] round to nearest 500?

2007-02-13 Thread tg-php
hah yeah, always worth a little skepticism, but it seemed to make some kind of sense. If you always round up or always round down, that's obviously not right and you end up losing potentially a lot of money or over-estimating the money involved. Founding up for 5 through 9 and down for 0

RE: [PHP] round to nearest 500?

2007-02-13 Thread tg-php
Ok, screw work.. it's snowing out anyway (not that that makes a real difference to doing PHP work inside), curiosity got the better of me. btw.. the banker rounding code here was pulled from the round() manual page. It's not what I read before, but it's the same concept: function

Re: [PHP] round to nearest 500?

2007-02-13 Thread tg-php
Ahh.. good call. http://en.wikipedia.org/wiki/Rounding Apprently it's called banker's rounding or statistician's rounding and is a little more complicated than just looking at the odd/even of the digit being arounded. This is starting to get into some heavy math theory and scary stuff that

Re: [PHP] round to nearest 500?

2007-02-13 Thread tg-php
I don't buy zero doesn't count. But again, this is getting into serious math. It should be good enough to say 0-4 = 0, 5-9 = 10, but if you don't keep strict high precision throughout the whole process and round at every step, things are going to be off no matter what. It's just a matter of

Re: [PHP] round to nearest 500?

2007-02-12 Thread tg-php
$num = 749; $rounded = round($num * 2, -3) / 2; echo $rounded; -TG = = = Original message = = = Is there an easy way in php to round to the nearest 500? So if I have 600, I 500 and if I have 800 I want 1000? Thanks! ___ Sent by

Re: [PHP] Text Editor for Windows?

2007-02-08 Thread tg-php
Lots of good recommendations have been made.. I just wanted to toss one more into the mix. It hasn't been updated in years, but does a fantastic job, and so far I havn't been lured by Notepad++ or any of the others enough (even after trying them) to switch. Check out Crimson Editor when you

Re: [PHP] Sorting issue

2007-02-08 Thread tg-php
Paul's probably right.. putting the sorting values in a table would be eaiser to maintain. I don't know what I was thinking with the whole then you don't HAVE to create a table. Both ways work.. but especially if you think the positions may change, then it'll be tons easier to update if

RE: [PHP] base64-encoding in cookies?

2007-02-07 Thread tg-php
Exactly what I was going to mention, Brad. Here's some more info. Quoted from PHP manual for urlencode(): Returns a string in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs. It is

Re: [PHP] Sorting issue

2007-02-07 Thread tg-php
Well, kind of ugly but you can do something like this: SELECT Position, CASE Position WHEN 'CEO' THEN 1 WHEN 'COO' THEN 2 WHEN 'CFO' THEN 3 WHEN 'HR' THEN 4 ELSE 99 END AS PositionSort FROM SomeTable ORDER BY PositionSort That way you're not creating a whole new table to store the sorting

Re: [PHP] _GET('name') truncates

2007-02-05 Thread tg-php
I'll let everyone else do the why the hell are you doing this? security blah blah! bad practice blah blah! type stuff.. I'm sure there will be plenty. One reason this may be happening is, depending on your browser, there's a limit to the number of characters you can have in a URL. That seems

Re: [PHP] OT - PHP Code Search

2007-02-01 Thread tg-php
Not too many ads on the pages after you find what you're searching for, and mostly just some ads by google type stuff. Speaking of Google.. you can also go here for PHP code searching.. I do all my cod (sic) searching there! Fresh!

[PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread tg-php
My contribution to the insanity.. INSERT statements made easy: $genericQY = INSERT INTO MOD_LMGR_Leads (; $genericQYvalues = VALUES (; $genericQY .= FirstName,; $genericQYvalues .= 'John',; $genericQY .= LastName; $genericQYvalues .= 'Smith';

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread tg-php
Strangely enough, Stut and Jochem, I DO find this more readable. Hah. I know, I'm insane. I have done it the way you guys proposed, using an associative array and using the keys and values as the columns and insert values. While that is what I'd call tighter code and when you understand what

Re: [PHP] bit wise math? Is there a function to easily return the bits?

2007-01-25 Thread tg-php
If there isn't a function to do exactly what you want, you could use dec2bin() to at least get the binary and work from there: http://us3.php.net/manual/en/function.decbin.php -TG = = = Original message = = = Is there a php function I can call to pass in a number and get the values returned?

Re: [PHP] OT - Leaving

2007-01-23 Thread tg-php
Best wishes John! We'll hold the fort and keep fighting the good fight in your absence. :) Good luck to ya! -TG = = = Original message = = = Howdy ladies and gents: For the past 9 or so years, with one email account or another, I have been subscribed to the PHP General Mailing List.

Re: [PHP] most powerful php editor

2007-01-21 Thread tg-php
God I love this list.. great answers everyone! (serious and non-serious :) In addition to the editors listed, here's a few more to consider: Crimson Editor - my personal favorite when I don't need code completion. Code highlights for many different types of code (including my beloved LUA files

Re: [PHP] md5

2007-01-17 Thread tg-php
MD5 is a hasing algorithm.. one-way.. really only good for checking known values and keeping them 'private', like storing passwords in a database. That way, if someone breaks into your database, they don't get the passwords, only the non-reversible MD5 hashes of the passwords. To check a

Re: [PHP] md5

2007-01-17 Thread tg-php
Still.. that has nothing to do with how well known MD5 is (so I stand by my point).All these databases are is a giant list of pre-MD5'd strings. Brute force stuff, no magic behind it that allows for reversing MD5. You could technically do that with just about any crypto or hashing system.

Re: [PHP] running exec() on client

2007-01-16 Thread tg-php
First.. I apologize for power-reading your message and not really grasping everything you're trying to do. From the responses, it sounds like my vote would be for PDF as well, being a very universal format and very easy to work with and makes small enough for your needs. If a file is still

Re: [PHP] sms through teleflip and php?

2007-01-16 Thread tg-php
I'm guessing the SMS system is rejecting the email because it's lacking some headers that mail programs tend to use... and spammers sometimes forget. You might send your email from Thunderbird.. CC yourself on it. Verify that it went through as a text message, then open the CC'd copy and look

Re: [PHP] sms through teleflip and php?

2007-01-16 Thread tg-php
Maybe phpMailer isn't sending the correct headers either. Sometimes all it takes is one missing header that a system is looking for and it may filter it as spam or something. Again, I encourage you to examine the headers from your Thunderbird good email and compare it to your PHP and/or

Re: [PHP] mssql_* overhead

2007-01-10 Thread tg-php
I thought the same thing as Jochem... that resources like database connections, couldn't be stored in $_SESSION. You say that's how you have (had?) it set up and it was working, but still sounds wrong to me. As for connections.. definitely don't open a new connection every time you run a

Re: [PHP] newbie question regarding URL parameters

2007-01-05 Thread tg-php
You'll probably get 50 answers to this, but here's probably what happened. There's a setting called register globals that will turn your name=me and age=27 into $name = me and $age = 27. It used to be turned ON by default. This was generally considered to be bad security, so it now defaults

Re: [PHP] Simple PDF manipulation

2006-12-27 Thread tg-php
Yeah, this is exactly what we do at my work. We have a license for PDFLib and essentually we load blank forms and then say take this text and position it at this location. Kind of like putting words on a clear piece of acetate and overlaying it on top of a piece of paper. If I recall, we had

Re: [PHP] Jump to a record when searching MYSQL with PHP Paging?

2006-12-22 Thread tg-php
I would guess this would depend highly on how you're displaying the data. Let's set up a scenario: 1. Full results come out to say, 100 records. 2. Searched item is #53 in the result set. Your choices for displaying the data could be one of the following: * One big web page, jumping to the

Re: [PHP] Are PHP5 features worth it?

2006-12-21 Thread tg-php
Ha! Mine too! How long before this secret gets out and our apps all start imploding?? Technically this is true. You can't do AJAX with PHP4. Or PHP5. Not the AJAX part at least, since it's all handled in Javascript.What gets returned to the AJAX app and what it interacts with on the

Re: [PHP] Count empty array

2006-12-21 Thread tg-php
Not sure why it does it, but doesn't seem to be a huge deal. I'm guessing it's because an empty string is still a string. It's not null. Anyway, it's documented at: http://us3.php.net/manual/en/function.explode.php A user writes: If you split an empty string, you get back a one-element array

Re: [PHP] Database Question

2006-12-20 Thread tg-php
So you have two single table votes.. make this a third. I'm guessing that each time you collect data, it's going to be one of each piece of data every time. Temperature, barametric pressure, humidity, wind direction, etc. You're not going to have 5 things all the time and like 3 other

[PHP] Re: [an attempt to inject a bit of humor back into the situation] Re: [PHP] Recomended host

2006-12-19 Thread tg-php
I hate you all. Screw PHP. I'm switching to Cold Fusion. :) PS. Puppies are good with ketchup. = = = Original message = = = tedd wrote: At 3:50 PM -0500 12/18/06, [EMAIL PROTECTED] wrote: I'm going to be controversial here and take issue with both of you. 2. Pointing out someone's

Re: [PHP] Video question

2006-12-19 Thread tg-php
To view a video, you do have to download it. But you don't have to download all of it at once. If a user did have to download the whole video and you still wanted to protect it, you'd want to look into some kind of DRM (digital rights management) solution probably. YouTube and similar

Re: [PHP] [an attempt to inject a bit of humor back into the situation] Re: [PHP] Recomended host

2006-12-19 Thread tg-php
Cheers tedd! Thanks for coming around. Life's too short to stress about stuff like this. There's always going to be people who don't understand (after all.. HE WASNT THERE MAN! sorry.. I couldn't help it :) I wasn't there either so my turn to be village idiot for a moment.. forgive the

Re: [PHP] Recomended host

2006-12-18 Thread tg-php
I'm going to be controversial here and take issue with both of you. 1. The original question was about a hosting provider. Presumably a PHP web hosting provider. So it is vaguely on-topic and is a question that's asked a lot. It's easy to get a list of hosting providers online, but I believe

Re: [PHP] Recomended host

2006-12-18 Thread tg-php
I'm going to be controversial here and take issue with both of you. 1. The original question was about a hosting provider. Presumably a PHP web hosting provider. So it is vaguely on-topic and is a question that's asked a lot. It's easy to get a list of hosting providers online, but I believe

RE: [PHP] Need help with RegEx

2006-12-11 Thread tg-php
If you didn't say using regex this is how I'd do it (untested, forgive typos and such..ripped from some code I actively use and stripped down): ?PHP $_XML_RESPONSE_PARSER = xml_parser_create(); xml_set_element_handler($_XML_RESPONSE_PARSER, 'xml_response_open_element_function',

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-12-04 Thread tg-php
You'd assume those ENV variables are secure.. or secure enough. I know there's no such thing as perfect security, but I still wonder if there's a better way. Although at this point, if there was a way to read other process/subprocess ENV variables, it'd most likely be something an attacker

Re: [PHP] Random pictures - not twice

2006-12-03 Thread tg-php
Without using cookies or session information, you're going to go through your picture list faster depending on how many users are accessing the random pic page. If you don't make it user-specific, then it doesn't really matter if you go through the images sequentially.. it may appear random on

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-12-01 Thread tg-php
If you did use ENV to set the username and password, you could always unset it using the same method after you ran the mysql command. So it'd only be exposed for a very brief period of time and slightly less accessible than just running a process list. It still falls under the category of

RE: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-29 Thread tg-php
Would it be possible, Jochem, to just make a shell script that does the call to mysql and have PHP exec() the shell script? I don't know if you'd have the same problem or not. I've never done something like this in *nix and paid attention to the process list. Also, I'm guessing you're seeing

Re: [PHP] hiding passwd in cmdlines that appear in the process list

2006-11-29 Thread tg-php
Ah.. makes sense. Good old DOS is stupid enough not to card most times. You can create a text file with a Y in it, and redirect it into a command like: del . y.txt Guess that's not a pipe technically. And some commands may be smart enough to prevent something like this. Thanks for the

Re: [PHP] WAP?

2006-11-03 Thread tg-php
Doesn't look like the content type is set properly. Here's another link that may be useful (from Zend themselves!) maybe that can help you out a bit. Content type and setting the xml version and DOCTYPE in the header are all fairly important. Also, if I recall.. Firefox and/or Opera (not IE)

Re: [PHP] WAP?

2006-11-02 Thread tg-php
WAP is just a sort of XML specific to creating 'cards' and content for cell phones. I did some stuff a few years ago, was even in line to teach a class at a local training institute. Once you figure out what structure you want to use for your cards and all that, the PHP stuff is really

Re: [PHP] WAP?

2006-11-02 Thread tg-php
Ah.. grat pull! I did forget about that one. Good stuff, thanks! And yes, that appears to be the address. = = = Original message = = = On Thu, 2006-11-02 at 17:11 -0500, [EMAIL PROTECTED] wrote: http://www.w3schools.com/wap/ Also, don't forget hawhaw. I think it lives at

Re: [PHP] Viruses

2006-11-02 Thread tg-php
As Rasmus said, they filter as much as they can on the list. But consider this... if someone's machine is infected and they below to this email list, it can harvest your email address and either spam (or send malware) from their PC to you or send your email address to somewhere else where it

Re: [PHP] Viruses

2006-11-02 Thread tg-php
As Rasmus said, they filter as much as they can on the list. But consider this... if someone's machine is infected and they below to this email list, it can harvest your email address and either spam (or send malware) from their PC to you or send your email address to somewhere else where it

Re: [PHP] Viruses

2006-11-02 Thread tg-php
As Rasmus said, they filter as much as they can on the list. But consider this... if someone's machine is infected and they below to this email list, it can harvest your email address and either spam (or send malware) from their PC to you or send your email address to somewhere else where it

Re: [PHP] Viruses

2006-11-02 Thread tg-php
As Rasmus said, they filter as much as they can on the list. But consider this... if someone's machine is infected and they below to this email list, it can harvest your email address and either spam (or send malware) from their PC to you or send your email address to somewhere else where it

Re: [PHP] Microsoft Partners With Zend

2006-11-01 Thread tg-php
http://www.winbinder.com much better than GTK if you work on Windows platforms and want standalone PHP apps :) And I can't find it now, but a few years ago when I was dipping my toe into the ASP.NET world to try to be compliant with Existing standards in a company I worked for (before

Re: [PHP] Is there a function can decrypt md5 ??

2006-10-24 Thread tg-php
There is no practical way to 'decrypt' an MD5 hash. It is meant to be a one-way encoding of data to produce a (mostly) unique ID. It does a lot better job than some of it's predecessors like CRC32, in producing a unique ID, but apparently it still has a very slim possibility of generating the

  1   2   3   4   >