Re: [PHP] The difference between ereg and preg?

2006-08-03 Thread Chris
Dave M G wrote: PHP List, Recently I wrote a piece of code to scrape data from an HTML page. Part of that code deleted all the unwanted text from the very top of the page, where it says "of a "" tag. That code looks like this: ereg_replace("", "", $htmlPage); It works fine. But I noticed th

Re: [PHP] The difference between ereg and preg?

2006-08-03 Thread Ligaya Turmelle
Dave M G wrote: PHP List, Recently I wrote a piece of code to scrape data from an HTML page. Part of that code deleted all the unwanted text from the very top of the page, where it says "of a "" tag. That code looks like this: ereg_replace("", "", $htmlPage); It works fine. But I noticed th

[PHP] The difference between ereg and preg?

2006-08-03 Thread Dave M G
PHP List, Recently I wrote a piece of code to scrape data from an HTML page. Part of that code deleted all the unwanted text from the very top of the page, where it says "of a "" tag. That code looks like this: ereg_replace("", "", $htmlPage); It works fine. But I noticed that on almost all

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Jonathan Duncan
On Fri, 4 Aug 2006, Jens Kleikamp wrote: Matt Todd wrote: Because of this, I determined to build my own framework. This was a few months ago, and Canvas[1] was the result of my labor. I produced this framework while working on numerous projects at the university I work at. This allowed me to

[PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Jens Kleikamp
Matt Todd wrote: In my experience with the other frameworks (primarily Wasp, CakePHP, Symfony, eZ Components, and Zend Framework), I've found that I was not satisfied with the quantity of low-quality code they advocate. I have a high standard for code quality, readability, maintainability, and (m

Re: [PHP] Is this a PHP issue, or a CGI issue? [SOLVED]

2006-08-03 Thread Dave M G
Jochem, Thank you for responding. no doubt it will become a php issue in the near future ;-) I'm sure it will. However, you have kick started me in the right direction, and I have the beginnings of a working page. Thank you for your helpful advice. -- Dave M G -- PHP General Mailing List

Re: [PHP] convert byte to MB

2006-08-03 Thread Adam Zey
Porpoise wrote: "Austin Denyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] What's with the blank messages?? His message wasn't blank, he sent this: Andrei wrote: > > So what u'r trying to say is that we should use KiB and not KB for > > kilobytes? That's funny!

Re: [PHP] convert byte to MB

2006-08-03 Thread Porpoise
"Austin Denyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] What's with the blank messages?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general@lists.php.net

2006-08-03 Thread Richard Lynch
echo $out[0][1] and see if it's what you think it is... On Wed, July 26, 2006 6:13 am, [EMAIL PROTECTED] wrote: > > Hi > I am reading a username and password from a file. For the moment I am > trying to test if the username and password are the same as user > inputted username/password. > My cod

Re: Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Matt Todd
In my experience with the other frameworks (primarily Wasp, CakePHP, Symfony, eZ Components, and Zend Framework), I've found that I was not satisfied with the quantity of low-quality code they advocate. I have a high standard for code quality, readability, maintainability, and (more generally) sem

Re: [PHP] Postcode proximity classes

2006-08-03 Thread tedd
At 2:23 PM -0500 8/3/06, Richard Lynch wrote: Note that the number of zip codes is around 60K in the TIGER data, and there have been a whole mess of zip codes added since then. Can you get the postal code by themselves? The last time I looked at TIGER data it was in quadrants of around the si

Re: [PHP] POST on redirects?

2006-08-03 Thread Adam Zey
Richard Lynch wrote: On Fri, July 28, 2006 3:55 pm, Tony Di Croce wrote: In a couple of my scripts, I do something like the following when I detect an improperly submitted form: **if( !valid_string( $_POST['firstname'] ) ) { $return_url = "https://www.abc.com/checkout_phase1.php?e

Re: [PHP] Postcode proximity classes

2006-08-03 Thread tedd
On Fri, July 28, 2006 12:06 pm, Dave Goodchild wrote: Hi all. I am about to start writing an events listing application (nationwide) and want users to be able for example to specify events within a 5, 10 and 15 mile radius of their postcode. Does anyone know of a set of classes/library th

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Martin Alterisio
2006/8/3, Manuel Lemos <[EMAIL PROTECTED]>: Hello, on 08/01/2006 01:35 PM Gabe said the following: > What's the common consensus as to a solid PHP framework to use for > application development? There seems to be a number of them out there, > but I'm not sure which one's are the most robust, a

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-08-03 Thread Richard Lynch
On Thu, July 27, 2006 1:05 pm, Adam Zey wrote: > Then how come when I do a foreach on an array (without modifying > anything within the foreach), it still makes a copy of the array that > consumes memory? I think it's dangerous to generalize that it's always > best to let PHP make copies of things.

Re: [PHP] running commands sequentially in background with exec($commands_in_background)

2006-08-03 Thread Richard Lynch
Use one exec for each command. And check the return values from the extra args to exec. On Fri, July 28, 2006 5:45 am, Dasdan wrote: > I want to execute a couple of linux commands from a php script > 'sequentially in background'. > > I want to run them in background so the php script doesn't ha

Re: [PHP] POST on redirects?

2006-08-03 Thread Richard Lynch
On Fri, July 28, 2006 3:55 pm, Tony Di Croce wrote: > In a couple of my scripts, I do something like the following when I > detect > an improperly submitted form: > > **if( !valid_string( $_POST['firstname'] ) ) > { > $return_url = > "https://www.abc.com/checkout_phase1.php?error=Firs

Re: [PHP] non blocking fsockopen

2006-08-03 Thread Richard Lynch
On Fri, July 28, 2006 7:21 am, clive wrote: > I know in PHP 5 you can use stream_socket_client() and set the flag to > STREAM_CLIENT_ASYNC_CONNECT|STREAM_CLIENT_CONNECT which opens the > socket > in a non blocking mode. > > in php 4 you can use fsockopen and then set the socket to non > blocking. >

Re: [PHP] More about fpdf

2006-08-03 Thread Richard Lynch
You can write the fpdf file into ANY folder that PHP has write access to, and there is no reason to put that folder directly into your web tree. You could certainly use /tmp with http://php.net/tmpname and friends, or you could just set up some folder in a convenient location as world writable. I

Re: [PHP] Postcode proximity classes

2006-08-03 Thread Richard Lynch
On Fri, July 28, 2006 12:06 pm, Dave Goodchild wrote: > Hi all. I am about to start writing an events listing application > (nationwide) and want users to be able for example to specify events > within > a 5, 10 and 15 mile radius of their postcode. Does anyone know of a > set of > classes/library

Re: [PHP] include defer from cli to apache

2006-08-03 Thread Richard Lynch
On Fri, July 28, 2006 7:25 pm, Martin Marques wrote: > I' trying to include files from a script which will be executed from > CLI via cron. > > Now, if I execute the script from the command line it works OK, but > when it's executed via cron I fails to include a file, which is being > included via

Re: [PHP] Saving a dynamic file

2006-08-03 Thread Richard Lynch
On Fri, July 28, 2006 9:01 pm, MIGUEL ANTONIO GUIRAO AGUILERA wrote: > > > Hi!! > > I'm in the need of saving to a file a dynamic page that I generated > from a PHP script, taking data from a table!! > > So far I have figured out two options: > > 1) Save the page as a XML document so it can be ed

Re: [PHP] sorting in array

2006-08-03 Thread Richard Lynch
For starters, the function is supposed to return 0 for countries that are equal. As it stands now, it's going to return 1 / -1 randomly based on which arg happens to be $a versus $b. That's bad. For some implementations of shuffle/sort routines, it will actually crash. I forget which implementa

Re: [PHP] PHP Frameworks - Opinion

2006-08-03 Thread Jonathan Duncan
On Tue, 1 Aug 2006, Gabe wrote: What's the common consensus as to a solid PHP framework to use for application development? There seems to be a number of them out there, but I'm not sure which one's are the most robust, actively developed, secure, etc etc. Thoughts? I echo others in th

RE: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Kilbride, James P.
> -Original Message- > From: Manuel Lemos [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 03, 2006 1:43 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Re: PHP Frameworks - Opinion > > Hello, > > on 08/03/2006 09:25 AM Paul Scott said the following: > > The main thing in Ma

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Robert Cummings
On Thu, 2006-08-03 at 14:42 -0300, Manuel Lemos wrote: > Hello, > > on 08/03/2006 09:25 AM Paul Scott said the following: > > The main thing in Manual's post that got me writing this in the first > > place was : > > > > "Imagine if there would be only one PDBC (JDBC for PHP). Instead of that > >

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Robert Cummings
On Thu, 2006-08-03 at 13:32 -0300, Manuel Lemos wrote: > Hello, > > on 08/03/2006 02:01 AM Robert Cummings said the following: > Anyway, you may want to read this more in depth reflection of the state > of the PHP framework world and recommendations on how to pick what suits > best

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Manuel Lemos
Hello, on 08/03/2006 09:25 AM Paul Scott said the following: > The main thing in Manual's post that got me writing this in the first > place was : > > "Imagine if there would be only one PDBC (JDBC for PHP). Instead of that > we have a never ending choice of PHP database abstraction layers that >

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Manuel Lemos
Hello, on 08/03/2006 09:17 AM Jochem Maas said the following: > Arno Kuhl wrote: >> I'm not so sure if the botanist wasn't saying in a rather confused way that >> he was playing on the same side as PHPClasses, even if he did profess to be >> in the other team. Did he say he was rolling his own (in

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Manuel Lemos
Hello, on 08/03/2006 07:37 AM Jochem Maas said the following: > PHPClasses 0 - Botanist 1 > > :-) Erm Paul Scott is a good contributor of the PHPClasses site: http://www.phpclasses.org/browse/author/145758.html Several of his classes have been nominated to the PHP Programming Innovation A

Re: [PHP] dynamically generated rotating gif

2006-08-03 Thread Manuel Lemos
Hello, On Mon, July 31, 2006 5:21 pm, Paul Nowosielski wrote: > I'm trying to create a dynamically generated rotating gif. > I want to add layers of text from a database to the image. > > Is this possible? If so , can someone give me some pointers or a link > to a good class or tutorial please? T

[PHP] automated gui testing of php apps

2006-08-03 Thread blackwater dev
What do you all recommend for testing the gui side of your php applications? I've played with badboy a bit but we all run linux here at work and I was looking for something more robust and would live to find a free/inexpensive tool. I've also tried SimpleTest for the ui side but it seemed to be

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Manuel Lemos
Hello, on 08/03/2006 02:01 AM Robert Cummings said the following: Anyway, you may want to read this more in depth reflection of the state of the PHP framework world and recommendations on how to pick what suits best for you: http://www.phpclasses.org/blog/post/52-Recommend

Re: [PHP] Nested foreach statement

2006-08-03 Thread Richard Lynch
It will probably work, and you could find out for sure by just trying it. It might be better to construct a single query using things like: $company_ids = implode(', ', $_POST['reporton_company']); $query .= " WHERE company_id IN ($company_ids) "; This presumes you have already validated the com

Re: [PHP] What good are constants if you can't use them in an array?

2006-08-03 Thread John Nichel
Daevid Vincent wrote: *sigh* Why is PHP so lame... Because some users are too lazy to RTFM. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

Re: [PHP] memory leak - how to find it?

2006-08-03 Thread Richard Lynch
On Mon, July 31, 2006 6:23 am, Robin Getz wrote: > I am trying to debug a php script that I downloaded, which has a > memory > leak in it. > > I was looking for a way to find what variables were in php's memory, > and > what size, they were, but I couldn't find anything? > > The script is a off-lin

Re: [PHP] Issues with PHP 5.1.4 / GD FreeType / Linux

2006-08-03 Thread Richard Lynch
Unless I'm mis-reading all this, you *ARE* getting FreeType 2.x support. But you're not getting FreeType 1.0 support, as you have 2.x instead. If you were not getting FreeType at all, it wouldn't even appear in phpinfo() output. Try using the freetype functions and see if you get "function xyz n

Re: [PHP] link problem

2006-08-03 Thread Richard Lynch
On Mon, July 31, 2006 4:38 pm, Ross wrote: > I have lots of folders and files some are in the main public_html > folder and > some are in their own foder. I need to find a way to make all the > links > relative to the public_html folder > > For example if I am in the 'gallery' folder, the main inde

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Richard Lynch
On Wed, August 2, 2006 9:50 am, Gabe wrote: > Gabe wrote: >> What's the common consensus as to a solid PHP framework to use for >> application development? There seems to be a number of them out >> there, >> but I'm not sure which one's are the most robust, actively >> developed, >> secure, etc et

Re: [PHP] dynamically generated rotating gif

2006-08-03 Thread Richard Lynch
On Mon, July 31, 2006 5:21 pm, Paul Nowosielski wrote: > I'm trying to create a dynamically generated rotating gif. > I want to add layers of text from a database to the image. > > Is this possible? If so , can someone give me some pointers or a link > to a good class or tutorial please? I *believ

Re: [PHP] Retrieving response headers from an off-site page

2006-08-03 Thread Richard Lynch
On Mon, July 31, 2006 5:36 pm, John Gunther wrote: > I'm trying to programatically retrieve a sales tax lookup page using > file_get_contents() but the page doesn't return data unless a session > id > is first retrieved and then supplied. http://php.net/curl is probably the easiest way to get/send

Re: [PHP] Dynamic Images

2006-08-03 Thread Richard Lynch
On Wed, August 2, 2006 7:12 pm, Jochem Maas wrote: >> The best solution to this is to change your IMG tag to have a random >> number in it, so that the cached image is never the same URL, so it >> never gets used. >> >> Stupid, I know, and wasteful of the browser cache disk space, but >> there it i

Re: [PHP] Issue regarding flow in php

2006-08-03 Thread Richard Lynch
On Thu, August 3, 2006 1:53 am, weetat wrote: >I have a php page . > >The php page is display when i have completed upload xml file to > server. >In the php page , there is a function name > insertxmldataToTempTbl(), > which insert xml data to MYSQL database as shown below after i have

Re: [PHP] SQL injection - Again

2006-08-03 Thread Richard Lynch
On Thu, August 3, 2006 2:32 am, Peter Lauri wrote: > Is there anyone in this group that has a simple script to check for > SQL > injection attacks? http://php.net/mysql_real_escape_string should cover this, no? Another option is to use a query mechanism based on prepared statements rather than ra

[PHP] SQL injection - Again

2006-08-03 Thread Peter Lauri
Hi, Is there anyone in this group that has a simple script to check for SQL injection attacks? In the theory I was thinking about to check $_POST and $_GET if they contain specific "substrings" that could be used in an attempt. Maybe to loop thru all set values and see if they contain "DELE

RE: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Paul Scott
On Thu, 2006-08-03 at 13:43 +0200, Arno Kuhl wrote: > I'm not so sure if the botanist wasn't saying in a rather confused way that > he was playing on the same side as PHPClasses, even if he did profess to be > in the other team. Did he say he was rolling his own (in a way only > botanists can do)

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Jochem Maas
Arno Kuhl wrote: > I'm not so sure if the botanist wasn't saying in a rather confused way that > he was playing on the same side as PHPClasses, even if he did profess to be > in the other team. Did he say he was rolling his own (in a way only > botanists can do) or not? that's beside the point - m

RE: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Arno Kuhl
I'm not so sure if the botanist wasn't saying in a rather confused way that he was playing on the same side as PHPClasses, even if he did profess to be in the other team. Did he say he was rolling his own (in a way only botanists can do) or not? -Original Message- From: Jochem Maas [mailt

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Jochem Maas
PHPClasses 0 - Botanist 1 :-) Paul Scott wrote: > >> You mean we should all be happy that so much choice is available! >> > > I agree with Rob! I am a botanist. I have never been trained in Computer > Science, as far as "industry" is concerned, I am not qualified to turn > on a PC. Fortunately

Re: [PHP] SQL injection

2006-08-03 Thread Robin Vickery
On 02/08/06, Jochem Maas <[EMAIL PROTECTED]> wrote: Russell Jones wrote: > > In real life terms, if you walked into the store and saw that the cash > register was slightly broken and slightly opened, and reached in and pulled > out a dollar to show the cashier what was wrong, you would not get in

[PHP] PHP 4.4.3 released

2006-08-03 Thread Derick Rethans
Hello! The PHP Development Team would like to announce the immediate release of PHP 4.4.3. This release combines small number of bug fixes and resolves a number of security issues. All PHP users are encouraged to upgrade to this release as soon as possible. A separate release announcement is a

Re: [PHP] SQL injection

2006-08-03 Thread Jochem Maas
Peter Lauri wrote: > Thank you all for your replies; it has been interesting to read. I am just > waiting for the webmaster to reply to me with his thoughts. > > My intentions for this were to help, not to break, so I do indeed hope that > they will not take legal action for it. A friend of mine h