I’m just starting web crawling and already having problems.
I have a URL
When you run it in a browser you get a plain text result, it is JSON but looks to be plain text.
I’m trying to capture those results using php. I’ve tried fopen() and file_get_contents() and they don’t seem to be working for me.
I just need to figure out how to get them into a variable. I know what to do after that. Also I’d like to avoid using any plugin like curl. Any ideas? Or am I just doing it wrong?
This is what I had:
$homepage = file_get_contents(‘https://www.bop.gov/PublicInfo/execute/inmateloc?todo=query&output=json&inmateNumType=IRN&inmateNum=94970004’);
echo $homepage;
I get nothing.
Any ideas? Thanks