[PHP] what is php4 popularity?

2009-10-08 Thread Paul M.
Hey guys, does anyone have a good link for an article where php4 popularity trends are examined? The best way for me to know php4 % and php5 %. I appreciate any good suggestions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo

2009-10-08 Thread Ashley Sheridan
On Wed, 2009-10-07 at 13:24 -0700, Tommy Pham wrote: > > > > From: tedd > To: php-general@lists.php.net; a...@ashleysheridan.co.uk; Daevid Vincent > > Sent: Wed, October 7, 2009 12:42:41 PM > Subject: RE: [PHP] Whacky increment/assignment logic with $foo++ vs

Re: [PHP] Apache Rewrite Issues

2009-10-08 Thread Ashley Sheridan
On Wed, 2009-10-07 at 16:49 -0400, Paul M Foster wrote: > On Wed, Oct 07, 2009 at 11:52:00AM +0100, Russell Seymour wrote: > > > Morning, > > > > I am trying to make my URLs more search engine friendly and I have come > > up against a problem. > > > > I want the following URL: > > > > mysite.

Re: [PHP] Insult my code!

2009-10-08 Thread Eric Bauman
On 8/10/2009 1:20 AM, Andrea Giammarchi wrote: So far I stopped at the first line, the constructor, where I can spot with what I can read SQL injections "everywhere" I hope here is a proper validation there, 'cause as is, sounds truly dangerous, since you are not using bindParams or other PDO

[PHP] Re: what is php4 popularity?

2009-10-08 Thread Eric Bauman
On 8/10/2009 4:28 PM, Paul M. wrote: Hey guys, does anyone have a good link for an article where php4 popularity trends are examined? The best way for me to know php4 % and php5 %. I appreciate any good suggestions. Here's a pretty graph comparing PHP version usage and time: http://www.nexen.n

Re: [PHP] Insult my code!

2009-10-08 Thread Eric Bauman
On 8/10/2009 5:18 PM, Mert Oztekin wrote: Hi Paul, As I agree some of your thoughts, I want to add my opinion also. Yes the code should work. That is why we earn Money. If it doesnt work, then we are on fire. But things like OOP or MVC weren't invented for a better running code. They are inven

[PHP] avoid Denial of Service

2009-10-08 Thread Gerardo Benitez
Hi everybody! I want to get some tips about how avoid a attack of Denial of service. May be somebody can about your experience with Php o some configuration of apache, o other software that help in these case. Thanks in advance. -- Gerardo Benitez

Re: [PHP] avoid Denial of Service

2009-10-08 Thread Gaurav Kumar
Not sure what exactly you are looking for. Anyways, some common practice are request for API key, username / password tokens before providing access to a service. Thanks, Gaurav Kumar On Thu, Oct 8, 2009 at 7:06 PM, Gerardo Benitez wrote: > Hi everybody! > > > I want to get some tips about ho

Re: [PHP] avoid Denial of Service

2009-10-08 Thread Ashley Sheridan
On Thu, 2009-10-08 at 19:40 +0530, Gaurav Kumar wrote: > Not sure what exactly you are looking for. > > Anyways, some common practice are request for API key, username / password > tokens before providing access to a service. > > Thanks, > > Gaurav Kumar > > > On Thu, Oct 8, 2009 at 7:06 PM,

[PHP] Re: what is php4 popularity?

2009-10-08 Thread Paul M.
Eric Bauman wrote: On 8/10/2009 4:28 PM, Paul M. wrote: Hey guys, does anyone have a good link for an article where php4 popularity trends are examined? The best way for me to know php4 % and php5 %. I appreciate any good suggestions. Here's a pretty graph comparing PHP version usage and time:

[PHP] XML RSS - Unexpected End of File error

2009-10-08 Thread Ashley Sheridan
Hi guys, I've knocked up a quick RSS feed on my site. It works fine in Fx 2 & 3, in Opera it throws an error "unexpected end of file" but allows the feed to be added anyway, and Chrome just says there's an XML error, and gives the second from last line as the one containing the error. I tried add

Re: [PHP] XML RSS - Unexpected End of File error

2009-10-08 Thread Jonathan Tapicer
Can you show the generated XML? Jonathan On Thu, Oct 8, 2009 at 3:45 PM, Ashley Sheridan wrote: > Hi guys, > > I've knocked up a quick RSS feed on my site. It works fine in Fx 2 & 3, > in Opera it throws an error "unexpected end of file" but allows the feed > to be added anyway, and Chrome just

Re: [PHP] XML RSS - Unexpected End of File error

2009-10-08 Thread Ashley Sheridan
On Thu, 2009-10-08 at 15:54 -0300, Jonathan Tapicer wrote: > Can you show the generated XML? > > Jonathan > > On Thu, Oct 8, 2009 at 3:45 PM, Ashley Sheridan > wrote: > > Hi guys, > > > > I've knocked up a quick RSS feed on my site. It works fine in Fx 2 & 3, > > in Opera it throws an error "un

Re: [PHP] XML RSS - Unexpected End of File error

2009-10-08 Thread Jim Lucas
Ashley Sheridan wrote: > On Thu, 2009-10-08 at 15:54 -0300, Jonathan Tapicer wrote: > >> Can you show the generated XML? >> >> Jonathan >> >> On Thu, Oct 8, 2009 at 3:45 PM, Ashley Sheridan >> wrote: >>> Hi guys, >>> >>> I've knocked up a quick RSS feed on my site. It works fine in Fx 2 & 3, >>>

Re: [PHP] XML RSS - Unexpected End of File error

2009-10-08 Thread Ashley Sheridan
On Thu, 2009-10-08 at 12:50 -0700, Jim Lucas wrote: > Ashley Sheridan wrote: > > On Thu, 2009-10-08 at 15:54 -0300, Jonathan Tapicer wrote: > > > >> Can you show the generated XML? > >> > >> Jonathan > >> > >> On Thu, Oct 8, 2009 at 3:45 PM, Ashley Sheridan > >> wrote: > >>> Hi guys, > >>> > >>>

[PHP] Newbie: Array of objects iteration

2009-10-08 Thread MEM
Hello all, I'm grabbing all records from a table using: $records = $stmt->fetchAll(PDO::FETCH_OBJ); return $records; In order to display the values we can do: foreach ($records as $record) { echo $record->id; echo $record->name; } Howev

[PHP] Newb question about getting keys/values from a single array element

2009-10-08 Thread Daevid Vincent
I feel like a total newb asking this, but I'm just having a brain fart or something... I'm writing a page where I can either get back a list of items: Array { [1233] => "apple", [6342] => "apricot", [2345] => "banana", ... } where the user

Re: [PHP] Newb question about getting keys/values from a single array element

2009-10-08 Thread Jonathan Tapicer
One possible solution: 'peach'); list($id, $name) = array_merge(array_keys($a), array_values($a)); echo "The ID is $id and the name is $name"; ?> Prints: "The ID is 8575 and the name is peach". Regards, Jonathan On Thu, Oct 8, 2009 at 10:08 PM, Daevid Vincent wrote: > I feel like a total new

Re: [PHP] Newb question about getting keys/values from a single array element

2009-10-08 Thread Paul M Foster
On Thu, Oct 08, 2009 at 06:08:48PM -0700, Daevid Vincent wrote: > I feel like a total newb asking this, but I'm just having a brain fart or > something... > > I'm writing a page where I can either get back a list of items: > > Array { > [1233] => "apple", > [6342] => "apric

[PHP] Native support to MS SQL Server

2009-10-08 Thread Raymond Irving
Hello, Will we ever see drivers for MS SQL Server in PHP5? I know MS is working on drivers for PHP 5.3 but it's not clear if they will ever produce a PDO driver for PHP. PDO is the way to go. The other thing is that MS latest version of the sqlsrv driver requires SQL Native Client 2008 and is

RE: [PHP] Native support to MS SQL Server

2009-10-08 Thread Rakesh Kumar
Yes correct it will work on old version -Original Message- From: Raymond Irving [mailto:xwis...@yahoo.com] Sent: Friday, October 09, 2009 9:56 AM To: php-general@lists.php.net Subject: [PHP] Native support to MS SQL Server Hello, Will we ever see drivers for MS SQL Server in PHP5? I k

[PHP] Correct handling _POST[] and implode. PHP5

2009-10-08 Thread bearsfoot
Hi all, I have a form that has has an array of information. Mulitple checkboxes can be selected. Choose the colors: Green Yellow Red Gray When processing the form.. echo $_POST['Colors'] . ''; // outputs 'Array' if ( isset($_POST['Colors']) ) { $_POST['Colors'] = implode(', ', $_PO

Re: [PHP] Newbie: Array of objects iteration

2009-10-08 Thread Fernando Castillo Aparicio
I think you are just looking for the key in the wrong place. Try: foreach ( $records as $record ) { foreach( $record as $column=>$value ) { echo "$column is $value\n"; } } You've got the columns names in each record, not in the global recorset. Good luck ;-) _

Re: [PHP] Newbie: Array of objects iteration

2009-10-08 Thread Lester Caine
Fernando Castillo Aparicio wrote: I think you are just looking for the key in the wrong place. Try: foreach ( $records as $record ) { foreach( $record as $column=>$value ) { echo "$column is $value\n"; } } You've got the columns names in each record, not in the glob