[PHP] Re: preg_replace problem

2009-06-13 Thread Al
Al wrote: This preg_replace() should simply replace all "&" with "&" unless the value is already "&" But; if $value is simple a quote character ["] I get ""e". e.g., "test" => "e;test"e; Search string and replace works as it should in Regex_Coach. echo $value.''; $value=preg_replace("%&(?

Re: [PHP] socket communication programming

2009-06-13 Thread HELP!
Thanks. I need to access remote data via TCP. Connecting to the given port has been successful but getting acknowledgement from the remote server after sending the login packet is a problem. Is there anything wrong sending the login packet in strings? or what is the best way? I probably think the

Re: [PHP] socket communication programming

2009-06-13 Thread Manuel Lemos
Hello, on 06/12/2009 11:41 AM HELP! said the following: > hi > I can not get the stream_get_contents() to work. it's returning empty. > If you have a login details "ALOGINPASS 1A" cant you just fwrite($ft, > "ALOGINPASS 1A"); or do you need to add other things > > > what is the meaning of this

[PHP] Re: preg_replace problem

2009-06-13 Thread Al
Shawn McKenzie wrote: Al wrote: This preg_replace() should simply replace all "&" with "&" unless the value is already "&" But; if $value is simple a quote character ["] I get ""e". e.g., "test" => "e;test"e; Search string and replace works as it should in Regex_Coach. echo $value.''; $valu

[PHP] Re: preg_replace problem

2009-06-13 Thread Al
Shawn McKenzie wrote: Al wrote: This preg_replace() should simply replace all "&" with "&" unless the value is already "&" But; if $value is simple a quote character ["] I get ""e". e.g., "test" => "e;test"e; Search string and replace works as it should in Regex_Coach. echo $value.''; $valu

[PHP] Re: preg_replace problem

2009-06-13 Thread Shawn McKenzie
Al wrote: > This preg_replace() should simply replace all "&" with "&" unless > the value is already "&" > > But; if $value is simple a quote character ["] I get ""e". e.g., > "test" => "e;test"e; > > Search string and replace works as it should in Regex_Coach. > > echo $value.''; > $value=preg_

Re: [PHP] how to pass a number through href url?

2009-06-13 Thread PJ
Stuart wrote: > 2009/6/13 PJ : > >> I wish to be able to edit db field that is displayed in a page by >> calling up another page to handle the editing. >> The problem is how to pass the id (number) through an href. In other >> words, can the number be included in the uri  and then filter the ur

[PHP] Re: [Bulk] Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-13 Thread Jean-Pierre Arneodo
Ashley Sheridan a écrit : On Thu, 2009-06-11 at 20:52 +0200, Jean-Pierre Arneodo wrote: Ashley Sheridan a écrit : On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve

[PHP] preg_replace problem

2009-06-13 Thread Al
This preg_replace() should simply replace all "&" with "&" unless the value is already "&" But; if $value is simple a quote character ["] I get ""e". e.g., "test" => "e;test"e; Search string and replace works as it should in Regex_Coach. echo $value.''; $value=preg_replace("%&(?!amp;)%i", "&

Re: [PHP] how to pass a number through href url?

2009-06-13 Thread Stuart
2009/6/13 PJ : > I wish to be able to edit db field that is displayed in a page by > calling up another page to handle the editing. > The problem is how to pass the id (number) through an href. In other > words, can the number be included in the uri  and then filter the uri to > leave just the numb

[PHP] how to pass a number through href url?

2009-06-13 Thread PJ
I wish to be able to edit db field that is displayed in a page by calling up another page to handle the editing. The problem is how to pass the id (number) through an href. In other words, can the number be included in the uri and then filter the uri to leave just the number? Is something like thi

Re: [PHP] High ID (unique, auto increment) causes slow responses on PHP (MySQL)

2009-06-13 Thread Stuart
2009/6/13 דניאל דנון : >  I've built a certain system where every time new user enters it creates a > "guest row" on "guests" table. he also gets an identifying cookie. > > The table contains several fields, one of them is ID which is auto increment > and unique > > When he does a certain action it

Re: [PHP] High ID (unique, auto increment) causes slow responses on PHP (MySQL)

2009-06-13 Thread Nitsan Bin-Nun
Just use SERIAL id and you will be good ;) (that's an alias for something like BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) It shouldn't bother you as long as it works. On Sat, Jun 13, 2009 at 9:16 PM, דניאל דנון wrote: > I've built a certain system where every time new user enters it

[PHP] High ID (unique, auto increment) causes slow responses on PHP (MySQL)

2009-06-13 Thread דניאל דנון
I've built a certain system where every time new user enters it creates a "guest row" on "guests" table. he also gets an identifying cookie. The table contains several fields, one of them is ID which is auto increment and unique When he does a certain action it gets recorded in the "done_action"

Re: [PHP] 3d image rotating

2009-06-13 Thread PJ
דניאל דנון wrote: > Hello. > > I'm looking for way to rotate normal images, but not x/y, but with Z also. > I get a source image (png, jpg, gif...) and I want to rotate it. assuming > the "depth" of the image is 1 pixel for example... > > I'm looking for a way to do it without using imagemagick - o

Re: [PHP] Re: Same Page, Fundamentally Different Behavior OR is Firefox broken?

2009-06-13 Thread Matt Neimeyer
I'd have to check... But am I to understand that no-cache works with pre-caching? I always assumed it basically meant "when you get this page, don't keep it for next time"? Thanks! On Fri, Jun 12, 2009 at 2:04 AM, Manuel C. wrote: > Matt Neimeyer a écrit : >> >> I'm at a complete loss... So I'm

RE: [PHP] Periodic Actions in PHP?

2009-06-13 Thread bruce
hi... is this a php/web based app... are the users using the chat function via the browser.. if this is a browser/web app, are you looking for a way for the php web app to refetch the textfile... i would assume so... have you figured out a rough architecture/design for your app.. in your design,

Re: [PHP] truncate a mb-string to a given octet length?

2009-06-13 Thread Tom Worster
eddie, you were quite right and i was wrong. after discovering that the longest utf8 varchar column that mysql will allow is varchar(333), i did some tests. on a varchar(255) column, mysql allows strings with up to 255 utf8 characters to be inserted. and it truncates at 255 characters observing u

Re: [PHP] Re: Periodic Actions in PHP?

2009-06-13 Thread Phpster
On Jun 13, 2009, at 9:11, Colin Guthrie wrote: 'Twas brillig, and Parham Doustdar at 13/06/09 09:42 did gyre and gimble: Hi there, I'm going to create a small chat script with PHP. The messages you want others to see will be added to a flat file (I.E. TXT file), and read and displayed by PH

[PHP] Re: Periodic Actions in PHP?

2009-06-13 Thread Colin Guthrie
'Twas brillig, and Parham Doustdar at 13/06/09 09:42 did gyre and gimble: Hi there, I'm going to create a small chat script with PHP. The messages you want others to see will be added to a flat file (I.E. TXT file), and read and displayed by PHP. However, I want this reading and displaying to be

Re: [PHP] 3d image rotating

2009-06-13 Thread Nitsan Bin-Nun
He treats the image as width, height and 1 pixel of depth. It should not be a problem as long as you finished Kita Yud Bet with 5 points of math (trigo & vectors) ;) Good luck! On Sat, Jun 13, 2009 at 1:44 PM, Ashley Sheridan wrote: > On Fri, 2009-06-12 at 11:55 +0300, דניאל דנון wrote: > > Hel

Re: [PHP] 3d image rotating

2009-06-13 Thread Ashley Sheridan
On Fri, 2009-06-12 at 11:55 +0300, דניאל דנון wrote: > Hello. > > I'm looking for way to rotate normal images, but not x/y, but with Z also. > I get a source image (png, jpg, gif...) and I want to rotate it. assuming > the "depth" of the image is 1 pixel for example... > > I'm looking for a way t

Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-13 Thread Ashley Sheridan
On Thu, 2009-06-11 at 20:52 +0200, Jean-Pierre Arneodo wrote: > Ashley Sheridan a écrit : > > On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: > > > >> Hi! > >> I'm stuck. > >> I don't understand why the php CLI dies after 3 hours in my script. > >> Any idea to solve? > >> Thanks >

Re: [PHP] Preventing XSS Attacks

2009-06-13 Thread Ashley Sheridan
On Thu, 2009-06-11 at 18:27 +0200, Jan G.B. wrote: > 2009/6/11 HallMarc Websites > > > > > > > > -Original Message- > > > From: tedd [mailto:tedd.sperl...@gmail.com] > > > Sent: Thursday, June 11, 2009 9:28 AM > > > To: PHP-General List > > > Subject: Re: [PHP] Preventing XSS Attacks > >

Re: [PHP] Re: ezmlm response

2009-06-13 Thread Ashley Sheridan
On Thu, 2009-06-11 at 13:39 -0400, Daniel Brown wrote: > On Thu, Jun 11, 2009 at 13:24, Mika Pohjola wrote: > > It could be arti...@bluemusicgroup.com or m...@bluemusicgroup.com > > > > Please, remove. Thanks. > > Mika, > > You will need to do this yourself at http://php.net/mailinglists.

Re: [PHP] Periodic Actions in PHP?

2009-06-13 Thread Sancar Saran
On Saturday 13 June 2009 11:42:49 am Parham Doustdar wrote: > Hi there, > I'm going to create a small chat script with PHP. The messages you want > others to see will be added to a flat file (I.E. TXT file), and read and > displayed by PHP. However, I want this reading and displaying to be > period

Re: [PHP] Periodic Actions in PHP?

2009-06-13 Thread Richard Heyes
Hi, > I'm going to create a small chat script with PHP. The messages you want > others to see > will be added to a flat file (I.E. TXT file), and read and displayed by PHP. > However, I want > this reading and displaying to be periodic. This means that I want PHP to > check the file for > new l

[PHP] Periodic Actions in PHP?

2009-06-13 Thread Parham Doustdar
Hi there, I'm going to create a small chat script with PHP. The messages you want others to see will be added to a flat file (I.E. TXT file), and read and displayed by PHP. However, I want this reading and displaying to be periodic. This means that I want PHP to check the file for new lines ever

[PHP] about locale settings

2009-06-13 Thread Per Jessen
When I've set LC_ALL before calling php, why do I need to call setlocale() in the script too: LC_ALL=de_DE.utf8 php -r "print strftime('%B');" June LC_ALL=de_DE.utf8 php -r "setlocale(LC_ALL,''); print strftime('%B');" Juni What am I missing here? I have no problem with the setlocale(LC_ALL,'')