A voir également:
- Un script php qui recupere la commune...
- Script vidéo youtube - Guide
- Comment recuperer un message supprimé sur whatsapp - Guide
- Mas script - Accueil - Windows
- Easy php - Télécharger - Divers Web & Internet
- Ghost script - Télécharger - Polices de caractères
6 réponses
je croi que ca va t'aider :
pour plus d'infos visiter ce lien : https://www.caida.org/tools/utilities/netgeo/NGAPI/index.xml
function getLocationCaidaNetGeo($ip)
{
$NetGeoURL = "http://netgeo.caida.org/perl/netgeo.cgi?target=".$ip;
if($NetGeoFP = fopen($NetGeoURL,r))
{
ob_start();
fpassthru($NetGeoFP);
$NetGeoHTML = ob_get_contents();
ob_end_clean();
fclose($NetGeoFP);
}
preg_match ("/LAT:(.*)/i", $NetGeoHTML, $temp) or die("Could not find element LAT");
$location[0] = $temp[1];
preg_match ("/LONG:(.*)/i", $NetGeoHTML, $temp) or die("Could not find element LONG");
$location[1] = $temp[1];
return $location;
}
pour plus d'infos visiter ce lien : https://www.caida.org/tools/utilities/netgeo/NGAPI/index.xml
Bonjour, genie2king,
et merci de vouloir contrbuer.
Un script comme ci-dessous recupere l'adresse; ca doit etre faisable :
<?php // /Eva/Func/geoinfos_extraire.php
function geoinfos_extraire()
{
$url = "http://www.geobytes.com/IpLocator.htm" ;
$questring = "GetLocation&template=php3.txt" ;
return get_meta_tags( $url.QUMA.$questring ) ;
}
?>
et merci de vouloir contrbuer.
Un script comme ci-dessous recupere l'adresse; ca doit etre faisable :
<?php // /Eva/Func/geoinfos_extraire.php
function geoinfos_extraire()
{
$url = "http://www.geobytes.com/IpLocator.htm" ;
$questring = "GetLocation&template=php3.txt" ;
return get_meta_tags( $url.QUMA.$questring ) ;
}
?>
les ip locator ne sont plus exact , vous à paris et le serveur dns pe etre à burkina faso . y a aussi des proxy ect ...
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
pour connaitre la commune d'origine de l'internaute, je crois avoir trouve un site qui fournit gracieusement la geolocalisation; voila la fonction que j'ai ecrite :
<?php // /Eva/Trac/geolocaliser.php
function geolocaliser( $ipno )
{
$geostring = file_get_contents( "http://api.hostip.info/get_html.php?ip=$ipno" ) ;
$liste = explode( NL, $geostring ) ;
foreach( $liste as $definition )
$binomes[] = explode( COSP, $definition ) ;
return $binomes[1][1].VISP.$binomes[0][1] ;
}
A+