How to rewrite this file_get_contents() snippet using wp_remote_get()
So take this code: $bizt_a = json_decode(file_get_contents(“https://karteritesed.hu/biztositok.json”)); Separate it out so that we do 1 thing per line ( if you pass it straight into json_decode what happens if the request fails and that site is down? json_decode isn’t expecting an error message! It’s going to turn around and ask “What’s this?!” ) $json = … Read more