[PHP] GeoIP Character Encoding
Hey, I'm using the PECL GeoIP module on php 5.2.10. When I look up an IP address, the geoip_record_by_name() function is giving me a string that contains special characters, such as the following: 'Portugal, 09, Vila Real De Santo António' 'Norway, 08, Ålesund' 'Portugal, 04, Vila Nova De Famalicão' (Note the ó, Å, and ã). I'm using PostgreSQL as my database. The database's encoding is UTF8, and the locale is C. When I try to insert the above strings into a VARCHAR column, I get errors similar to the following: ERROR: invalid byte sequence for encoding UTF8: 0xf36e696f ERROR: invalid byte sequence for encoding UTF8: 0xc56c ERROR: invalid byte sequence for encoding UTF8: 0xe36f2c Now, I believe I can solve the problem by changing the client_encoding of my postgresql client (Right now, it is set to UTF8). However, I'm trying to figure out what encoding the GeoIP function is returning to me so that I can set the client_encoding appropriately. Is it LATIN1? How can I figure it out? And can I change it to UTF8? Thank you for your time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GeoIP?
Hello, I am in creation of a WaveLAN service in Germany and my HTML-Form is DoS'ed be idiots outside of Germany. Can someone tell me how to prevent peoples, filling out the form without being in Germany? Note: I do not want to load the whole GeoIP Database in my scripts. Or is there a Free Online-Service which can do this? If not, it would be a nice project to start and could work like the RBL. Thanks, Greetings and nice Day/Evening Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # http://www.tamay-dogan.net/ Michelle Konzack http://www.can4linux.org/ Apt. 917 http://www.flexray4linux.org/ 50, rue de Soultz Jabber linux4miche...@jabber.ccc.de 67100 Strasbourg/France IRC #Debian (irc.icq.com) Tel. DE: +49 177 9351947 ICQ #328449886Tel. FR: +33 6 61925193 signature.pgp Description: Digital signature
Re: [PHP] GeoIP?
At 1:52 PM +0100 3/15/09, Michelle Konzack wrote: Hello, I am in creation of a WaveLAN service in Germany and my HTML-Form is DoS'ed be idiots outside of Germany. Can someone tell me how to prevent peoples, filling out the form without being in Germany? Note: I do not want to load the whole GeoIP Database in my scripts. Or is there a Free Online-Service which can do this? If not, it would be a nice project to start and could work like the RBL. Thanks, Greetings and nice Day/Evening Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant I'll answer, but I'm not in Germany. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GeoIP?
Take a look at this: http://www.maxmind.com/app/geolitecountry Use indexes, I think the checkup won't take long. HTH, Nitsan On Sun, Mar 15, 2009 at 3:06 PM, tedd tedd.sperl...@gmail.com wrote: At 1:52 PM +0100 3/15/09, Michelle Konzack wrote: Hello, I am in creation of a WaveLAN service in Germany and my HTML-Form is DoS'ed be idiots outside of Germany. Can someone tell me how to prevent peoples, filling out the form without being in Germany? Note: I do not want to load the whole GeoIP Database in my scripts. Or is there a Free Online-Service which can do this? If not, it would be a nice project to start and could work like the RBL. Thanks, Greetings and nice Day/Evening Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant I'll answer, but I'm not in Germany. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GeoIP?
Michelle Konzack wrote: Hello, I am in creation of a WaveLAN service in Germany and my HTML-Form is DoS'ed be idiots outside of Germany. Can someone tell me how to prevent peoples, filling out the form without being in Germany? Note: I do not want to load the whole GeoIP Database in my scripts. The easiest is to use a DNS service - this is the best one I know: http://countries.nerd.dk/ /Per -- Per Jessen, Zürich (9.8°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php