Q:

How do I retrieve the visitor's ISP through PHP

I followed this site 
How do I retrieve the visitor's ISP through PHP?
to get the ISP data, but it's not working anymore( failed to open stream: HTTP request failed). I also tried to use curt
$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL,'http://www.whatismyipaddress.com/ip/132.123.23.23');
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") );
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Your application name');
$query = curl_exec($curl_handle);
curl_close($curl_handle);

echo $query;

but I'm getting the following error:
Moved Permanently    
The document has moved here.

Does anybody know  similar solution?

EDITED
The curl solution is working only on my localhost, unfortunately the web-host service doesn't allow that. Does anybody know a solution using file_get_contents?

A:

Set the option
curl_setopt( $curl_handle, CURLOPT_FOLLOWLOCATION, true );

to follow header redirects.

