At http://nwgerh.site88.net/default.php, the code is:
<html>
<body>
<?php
$url = "http://www.google.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
echo json_encode($data);
?>
</body>
</html>
I'm trying to use Javascript to access the JSON from PHP. See my JSFiddle (based on this tutorial), but there are errors.
What's wrong? Is there a cross-domain issue?
SyntaxError: missing ) after argument list
)
after the argument list?XMLHttpRequest cannot load http://nwgerh.site88.net/default.php. Origin http://fiddle.jshell.net is not allowed by Access-Control-Allow-Origin.