i am completely new to php from python. in python, i am fairly familiar with getting json results from webpages. however whatever i seem to do in php is not working. the code i am using is.
<?php
$url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=hello&safe=off";
$data = json_decode(file_get_contents($url));
echo $data;
?>`
yet this does absolutely nothing. is there anything wrong with what i am doing? also i ran it through ideone.com and got these errors.
`PHP Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/VQMKwy/prog.php on line 3
PHP Warning:file_get_contents(http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=hello&safe=off): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/VQMKwy/prog.php on line 3`
allow_url_fopen = 1inphp.ini