Jump to content

map


redarrow

Recommended Posts

 

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;

}
?>

Link to comment
https://forums.phpfreaks.com/topic/70869-map/
Share on other sites

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);

?>

Link to comment
https://forums.phpfreaks.com/topic/70869-map/#findComment-356261
Share on other sites

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

 

Link to comment
https://forums.phpfreaks.com/topic/70869-map/#findComment-356268
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.