shyam
answered Nov 30 '-1 00:00
use ipinfo.io api
$ipaddress="66.249.79.185";//google crawler IP address
$PinPointInfoFromIp=json_decode(file_get_contents("http://ipinfo.io/".$ipaddress));
following is json.
{
"ip": "66.249.79.185",
"hostname": "crawl-66-249-79-185.googlebot.com",
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.4192,-122.0574",
"org": "AS15169 Google Inc.",
"postal": "94043",
"carrier": "T-Mobile"
}
[/code]
you can use object to get info.for example $PinPointInfoFromIp->hostname give you hostname