redarrow Posted September 27, 2007 Share Posted September 27, 2007 this will show all needed for the users ip address.... the result is this format. <li>IPAddress:<fontcolor=green>xxxxxxxxxx</font><sup>*</sup></br> <li>City:London</br> <li>State:17</br> <li>Country:UnitedKingdom</br> <li>Latitude:51.5</br> <li>Longitude:-0.11670000000001</br> <li>ISP:xxxxxxxxx</br> <li>Organization:xxxxxxxxxx now i wont to add a map via a website using latitude and longitude any idears not using google maps one that using this method in there url. <?php $ip=$_SERVER['REMOTE_ADDR']; $$ip=$_POST['ip']; $ch = file_get_contents('http://www.checkip.org/?$ip'); $a=explode(' ',$ch); for($i=199; $i<214; $i++){ $r=$a[$i]; echo $r; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/70869-map/ Share on other sites More sharing options...
redarrow Posted September 27, 2007 Author Share Posted September 27, 2007 tried to use iframe no luck the map disapears . <?php $ip=$_SERVER['REMOTE_ADDR']; $$ip=$_POST['ip']; $url="http://www.checkip.org/?$ip"; $ch = file_get_contents("$url"); $a=explode(' ',$ch); for($i=199; $i<214; $i++){ $r=$a[$i]; echo $r; } echo"<iframe src ='$url' width='100%'></iframe>"; ?> curl dosent do it iver <?php $ip=$_SERVER['REMOTE_ADDR']; $$ip=$_POST['ip']; $url="http://www.checkip.org/?$ip"; $ch = file_get_contents("$url"); $a=explode(' ',$ch); for($i=199; $i<214; $i++){ $r=$a[$i]; echo $r; } $ch = curl_init($url); curl_exec ($ch); curl_close ($ch); ?> Quote Link to comment https://forums.phpfreaks.com/topic/70869-map/#findComment-356261 Share on other sites More sharing options...
HuggieBear Posted September 27, 2007 Share Posted September 27, 2007 I don't know if you wrote these posts in a rush, but I have NO idea as to what you're trying to achive and what you're actually asking. Regards Huggie Quote Link to comment https://forums.phpfreaks.com/topic/70869-map/#findComment-356263 Share on other sites More sharing options...
redarrow Posted September 27, 2007 Author Share Posted September 27, 2007 using a website to get geo info from my ip but also useing there map info via iframe or file_get_contents or curl. came across a problam that you can not pull maps in any of these ways. why? if you use any of my examples your see the map disapears from there site. i understand you join goggle map api you can get it done, but i wanted to do it the easy way via geting the current longitude and latitude in a website url and then show the map Quote Link to comment https://forums.phpfreaks.com/topic/70869-map/#findComment-356268 Share on other sites More sharing options...
HuggieBear Posted September 27, 2007 Share Posted September 27, 2007 Well the following url will give you a map from the latitude and longitude, all you need to do now is get the former from the IP address: Mapquest Regards Huggie Quote Link to comment https://forums.phpfreaks.com/topic/70869-map/#findComment-356273 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.