Made xml parser on Js . Everything works fine on my computer. But on another computer, it does not download xml , it loads for a long time and does not download anything. And on the third he from 2 xml downloads only 1 what could be the problem? I use wampp server , php5

xml download currency rates from www.nationalbank.kz and weather from www.eurometeo.ru .

php code

 <?php header("Content-Type: text/xml"); $filename = $_GET["url"]; $handle = fopen($filename, "rb"); $contents = ''; while (!feof($handle)) { $contents .= fread($handle, 8192); } fclose($handle); echo($contents); ?> 
  • Can allow_url_include be disabled in php? - Marsel Arduanov
  • turned on, everything just does not want to load - HELO WORD

1 answer 1

Try to enable error output in php: error_reporting(E_ALL) and ini_set('display_errors', 1) . And look what kind of error occurs. Your request may be blocking the firewall. Try this code:

 <?php error_reporting(E_ALL); ini_set('display_errors', 1); $filename = $_GET["url"]; $contents = file_get_contents($filename); echo $contents; ?>