User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,473 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,939 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 5776 | Replies: 3
Join Date: Sep 2005
Posts: 139
Reputation: aarya is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
aarya's Avatar
aarya aarya is offline Offline
Junior Poster

find county using ip address

  #1  
May 10th, 2006
$url=$_POST['url'];
$ip = gethostbyname($url);
$long1 = ip2long($ip)

if ($long1 == -1 || $long1 == FALSE)
{ echo 'Invalid IP, please try again';
}
else {

print $url;
echo $ip ?>

bu this code i get ip address but i need the country name aslo with this ip address. is thers any function to get country?
thanks
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 4:24 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC