FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » US, Canada or International
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: US, Canada or International [message #170264 is a reply to message #170245] Sat, 23 October 2010 14:14 Go to previous message
Daniel Peraza is currently offline  Daniel Peraza
Messages: 6
Registered: September 2010
Karma:
Junior Member
There are a bunch of several web services and APIS that will allow you
to geocode the visitor's IP address.For instance, try maxmind's geoip
or yahoo geo coding services (the latter being recommended). Google
them out and you'll see what I mean.

On Oct 22, 1:23 pm, Denis McMahon <denis.m.f.mcma...@googlemail.com>
wrote:
> On 22/10/10 17:42, Jeff Thies wrote:
>
>>  I'd like to sniff out whether a visitor is in the US, Canada or
>> elsewhere. I realize this can't be absolutely reliable but what might be
>> the best option using php of course.
>
>>   That, I suppose, could either hash through the user agent or the
>> remote address. Something else?
>
>>   Suggestions or code?
>
> whois the ip address?
>
> Have a look athttp://www.geobytes.com/iplocator.htm
>
> Maybe start with:
>
> <?php
>
> $url =
> ' http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt& ;I....
> . $_SERVER['REMOTE_ADDR'];
> $tags = get_meta_tags($url);
>
> echo "<pre>\n";
> print_r ($tags);
> echo "</pr

e>\n";
>
> ?>
>
> Rgds
>
> Denis McMahon
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Displaying a longblob as an image
Next Topic: DOMDocument loadHTML and double UTF8 encode
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 03:25:52 GMT 2024

Total time taken to generate the page: 0.03687 seconds