| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | Hi I need a little help. I'm using http://api.hostip.info/country.php to fetch the locale of the visitor. I'd like to fetch this through my PHP script, with something like this: $locale = @file("http://api.hostip.info/country.php"); But, then this web service doesn't fetch my visitors location, but my web server location. I need tihs to programatically set the default language for my multilanguage website. Does anybody have any idea how to "fix" this ? Thank you
__________________ Martic.net - Talking in binary since 1980. TXTberry.com - Text-based services for blackberry and other mobile devices (whois, etc.). |
| |
| | #2 (permalink) |
| Senior Member | just had a quick look on their site and it just seems a simple case of you not putting the ip variable on the address you should have:- PHP Code:
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #3 (permalink) |
| NamePros Member | You should look for another solution, because this one will always show the GEOinfo of the host calling the script (i.e.: your own IP). I have a geoinfo script running here: http://fadlan.com/ip and this one lets you enter the desired IP: http://fadlan.com/ip2c Regards.
__________________ technfo.com - pick.pk - ajaxpro.es - gbt.es - jamones.cn - sqzd.com - geoinfo.net Free URL Redirection (for sale) (62,000+ subdomains and growing!!) Real IP / Proxy IP |
| |
| | #4 (permalink) | |
| Senior Member | Quote:
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft | |
| |
| | #5 (permalink) |
| Danltn.com | I messed around with it for a bit and created http://mf1.us/ip - Their database isn't really big enough yet though. |
| |
| | #6 (permalink) |
| NamePros Member | Yup, that's it, I forgot about it.... I'm screeming to myself now - RTFM !!!! ![]() Thanks !
__________________ Martic.net - Talking in binary since 1980. TXTberry.com - Text-based services for blackberry and other mobile devices (whois, etc.). |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |