<?php
$ip = '59.32.28.65';
$url = "http://www.ipmango.com/api.php?ip=".$ip;
$xml = simplexml_load_file($url);
echo "IP address : {$xml->ipaddress} <br />";
echo "City : {$xml->city} <br />";
echo "Region : {$xml->region} <br />";
echo "Country Name : {$xml->countryname} <br />";
echo "Latitude : {$xml->latitude} <br />";
echo "Longitude : {$xml->longitude} <br />";
?>
theausum 8 Junior Poster in Training
Recommended Answers
Jump to PostHi theausum,
Two things:
Firstly, please use code tags when posting code. It really does make it a lot easier to read.
Secondly, did you have a question?
Jump to PostYou know this thread is four years old. The site may no longer support the snippet above.
Jump to PostDepending on what you want to do but I use http://ip2location.com/ to generate a code for a iframe I use in the sidebar. It displays to visitors and appears to be tracking their …
All 9 Replies
darkagn 315 Veteran Poster Featured Poster
theausum 8 Junior Poster in Training
chinmay235_1 0 Newbie Poster
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
mlm2gether 0 Newbie Poster
varunr 0 Newbie Poster
Pramod_7 0 Newbie Poster
DJBirdi 54 Junior Poster
Pramod_7 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.