Re: [PHP] Re: mysql_real_escape_string("asdasddas") ??? wtf

2009-02-21 Thread German Geek
Ah, ic. Mh, why wouldn't a function like that function without a db connection? Does it use the db? Isn't that less efficient? I might just use str_replace, because i can't think of any way that one could get a sql injection into str_replace("'", "\\\'", $value); // might need to replace a literal

Re: [PHP] Re: mysql_real_escape_string("asdasddas") ??? wtf

2009-02-21 Thread Ashley Sheridan
On Sat, 2009-02-21 at 22:55 +1300, German Geek wrote: > Ah, ic. Mh, why wouldn't a function like that function without a db > connection? Does it use the db? Isn't that less efficient? I might just use > str_replace, because i can't think of any way that one could get a sql > injection into > > st

Re: [PHP] Re: mysql_real_escape_string("asdasddas") ??? wtf

2009-02-21 Thread Ross McKay
German Geek wrote: >Ah, ic. Mh, why wouldn't a function like that function without a db >connection? Does it use the db? Isn't that less efficient? It doesn't use the db - at least, it doesn't make a call to the db. It probably wants a db resource handle so that it can know what character set it

Re: [PHP] Re: mysql_real_escape_string("asdasddas") ??? wtf

2009-02-21 Thread Per Jessen
Ross McKay wrote: > It doesn't use the db - at least, it doesn't make a call to the db. It > probably wants a db resource handle so that it can know what character > set it is meant to be handling, which is established as a property on > the connection. Yep, that's exactly why. If the current c

Re: [PHP] mysql_real_escape_string("asdasddas") ??? wtf

2009-02-21 Thread Robert Cummings
On Sat, 2009-02-21 at 19:19 +1300, Tim | iHostNZ wrote: > Hi everyone, > > Can anyone here tell me why mysql_real_escape_string("asdasddas") returns an > empty string? > > Just writing a data import... > > Anyway, for security but also simply because i might have a ' in the string, > i need to e

Re: [PHP] Unique User Hashes

2009-02-21 Thread Per Jessen
Nathan Rixham wrote: > it's all a bit pointless, the only way to ensure only one vote per > person is to get take and test a dns sample from each user. > > anything else is going to be flawed Not at all - you issue voting-rights based on user identity. Works very well in many places. Here in S

Re: [PHP] Unique User Hashes

2009-02-21 Thread tedd
At 1:19 PM +0100 2/21/09, Per Jessen wrote: Nathan Rixham wrote: it's all a bit pointless, the only way to ensure only one vote per person is to get take and test a dns sample from each user. anything else is going to be flawed Not at all - you issue voting-rights based on user identity.

Re: [PHP] Unique User Hashes

2009-02-21 Thread Per Jessen
tedd wrote: [agree with all of the above] > So in Switzerland if each of you have a ID card, then the problem is > "solved" as descried above. However, if there is no ID card, then > other methods must be considered. It's not the ID-card as such (it's your ability to prove your own identity), b

[PHP] redirecting output for a spawned child process..

2009-02-21 Thread bruce
hi... got a situation where i have a parent app that spawns children. trying to figure out how to get the output of the spawned/forked children to be written to an external file... can't seem to find any examples of how to accomplish this... do i have to insert something within the child php app

Re: [PHP] redirecting output for a spawned child process..

2009-02-21 Thread Per Jessen
bruce wrote: > hi... > > got a situation where i have a parent app that spawns children. trying > to figure out how to get the output of the spawned/forked children to > be written to an external file... Normally I would use freopen() on stdout and stderr, but that's not available in PHP :-( >

[PHP] adding whitespace to a timestamp

2009-02-21 Thread Eric Sherman
I hoping to add a space between the date and the time in this: $thedate = date('M jS g:i A', $postTIME); i.e, between* jS* and *g:i* I've looked around but can't find anything. Thanks Eric Sherman Multi Media Information -- Copyediting the web, one page at a time.

[PHP] Re: adding whitespace to a timestamp

2009-02-21 Thread Shawn McKenzie
Eric Sherman wrote: > I hoping to add a space between the date and the time in this: > > $thedate = date('M jS g:i A', $postTIME); > > i.e, between* jS* and *g:i* > > I've looked around but can't find anything. > > Thanks > > Eric Sherman > Multi Media Information There is already a space the

Re: [PHP] adding whitespace to a timestamp

2009-02-21 Thread Jason Pruim
On Feb 21, 2009, at 1:28 PM, Eric Sherman wrote: I hoping to add a space between the date and the time in this: $thedate = date('M jS g:i A', $postTIME); i.e, between* jS* and *g:i* I've looked around but can't find anything. Thanks If what you want it to have something like this: First

Re: [PHP] mysql_real_escape_string("asdasddas") ??? wtf

2009-02-21 Thread Tim | iHostNZ
OK, thanks. I think you guys are right. It's just safer and simpler than writing my function and probably not really slower either. need a db connection anyway. Read a bit on the function and yeah, a bit of screwed up binary data might yet cause funny errors although the xml is a feed from a truste

Re: [PHP] mysql_real_escape_string("asdasddas") ??? wtf

2009-02-21 Thread 9el
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com -- On