I try to get the text from a website with the file_get_contents()-function in PHP.
$myVariable = file_get_contents('myUrl/json/file.json?jsonp=loadSomething);
Unfortunately I keep getting the message
"Warning:
file_get_contents(myUrl/json/file.json?jsonp=loadSomething):
failed to open stream: HTTP request failed!
HTTP/1.1 404 Not Found in *path of my .php- file* on line 10"
In php.ini, allow_url_fopen is set to "On". I also already tried urlencode().
What can I do to get my code working?
json/? However, try use an absolute path if you not have done that yet.