This question already has an answer here:
have run my theme through the Theme checker plugin and it seems upset about use of 'file_get_contents' to get a json url. I've found posts saying i should use wp_remote_get. I'm currently decoding the url with the following:
$url = 'url' . $var; $json = file_get_contents($url,0,null,null); $output = json_decode($json,true);
The message I get from the Theme Checker is:
'WARNING: file_get_contents was found in the file.php possible file operations.'
Is it just saying this because there is a fucntion I could possibly use by wordpress or any other reasons? Also how would I use 'wp_remote_get'. I tried a few variations, mostly replacing file_get_contents with wp_remote_get with no luck,. Doesn't seem to decode the url at all.