Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.