Solution 1
You can use file_get_contents
Try this -
print_r( simplexml_load_string( file_get_contents("http://pubapi.atti.com/search-api/search/devapi/search?searchloc=78597&term=pizza&format=xml&sort=distance&radius=5&listingcount=10&key=gmj3x7mhsh%22") ) );
Solution 2
function get_data($url){
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)');
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$url = 'http://pubapi.atti.com/search-api/search/devapi/search?searchloc=78597&term=pizza&format=xml&sort=distance&radius=5&listingcount=10&key=gmj3x7mhsh%22';
$result = get_data($url);
print_r(simplexml_load_string($result));