php-general Digest 18 Oct 2009 07:11:18 -0000 Issue 6396

2009-10-18 Thread php-general-digest-help
php-general Digest 18 Oct 2009 07:11:18 - Issue 6396 Topics (messages 299019 through 299025): Re: How to pronounce PHP code over the phone? 299019 by: LinuxManMikeC Re: Sanitizing potential MySQL strings with no database connection 299020 by: Dotan Cohen 299023 by:

php-general Digest 18 Oct 2009 19:21:08 -0000 Issue 6397

2009-10-18 Thread php-general-digest-help
php-general Digest 18 Oct 2009 19:21:08 - Issue 6397 Topics (messages 299026 through 299034): Re: Sanitizing potential MySQL strings with no database connection 299026 by: Dotan Cohen 299027 by: Kim Madsen 299034 by: Dotan Cohen Using setters/getters with array of

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-18 Thread Jim Lucas
Dotan Cohen wrote: How can I configure mysql_real_escape_string() to _not_ need a database connection in order to do it's work on a string. I understand that the function wants a database connection to determine which charset / encoding is in use, but in my case it will always be UTF-8. I have

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-18 Thread Dotan Cohen
I assumed the reason you wanted to do escape the string so that you could perform DB operations. Yes, that is my intention. However, the function is found in an include file of functions used in many different scripts, each of which connect to a different database or may not connect to a

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-18 Thread Kim Madsen
Dotan Cohen wrote on 2009-10-18 10:52: I assumed the reason you wanted to do escape the string so that you could perform DB operations. Yes, that is my intention. However, the function is found in an include file of functions used in many different scripts, each of which connect to a

[PHP] Using setters/getters with array of objects

2009-10-18 Thread mbneto
Hi, I have two classes User and Email where one User can have many Emails so I've done like this class Email { protected $_email; public function __get($name) { $property = '_' . $name; return $this-$property; } public function __set($name, $value) {

Re: [PHP] Using setters/getters with array of objects

2009-10-18 Thread Andy Shellam (Mailing Lists)
Hi, $u-emails[] = $e; I would hazard a guess because $u-emails isn't a concrete object (whereas $u-_emails is, but is private.) It's sort of a virtual reference - PHP has no way of knowing that $u-emails actually translates into _emails which is an array, if you see what I mean

Re: [PHP] Using setters/getters with array of objects

2009-10-18 Thread Tommy Pham
- Original Message From: mbneto mbn...@gmail.com To: php-general@lists.php.net Sent: Sun, October 18, 2009 8:31:53 AM Subject: [PHP] Using setters/getters with array of objects Hi, I have two classes User and Email where one User can have many Emails so I've done like this

[PHP] ip-to-country

2009-10-18 Thread SED
Hi, How can I access an index for IP to a country (or a more detailed location)? I have not yet found a function for that in PHP nor a free to use website that offers a remote search. Perhaps, there is another solution - any ideas? Regards, Summi -- PHP General Mailing List

Re: [PHP] ip-to-country

2009-10-18 Thread Michael Shadle
http://pecl.php.net/package/geoip however i tried a few IPs once and it was unknowns On Sun, Oct 18, 2009 at 12:03 PM, SED s...@sed.is wrote: Hi, How can I access an index for IP to a country (or a more detailed location)? I have not yet found a function for that in PHP nor a free to use

Re: [PHP] ip-to-country

2009-10-18 Thread Per Jessen
SED wrote: Hi, How can I access an index for IP to a country (or a more detailed location)? I have not yet found a function for that in PHP nor a free to use website that offers a remote search. Perhaps, there is another solution - any ideas? DNS lookup - see http://countries.nerd.dk

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-18 Thread Dotan Cohen
test if you have a db connection in the function, if not, skip MRES and other mysql_ functions? I thought that one could not test if a database connection is established or not, this is the most relevant thing that I found while googling that: http://bugs.php.net/bug.php?id=29645 In my

Re: [PHP] ip-to-country

2009-10-18 Thread George Langley
On 18-Oct-09, at 1:03 PM, SED wrote: How can I access an index for IP to a country (or a more detailed location)? http://www.maxmind.com/app/ip-location has both free and various paid services. George -- PHP General Mailing List (http://www.php.net/) To unsubscribe,