file_get_contents not working

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
bomb3rman
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Tue May 19, 2015 12:35 am

file_get_contents not working

Post by bomb3rman »

This use to work before, now everytime i try to use an API on the webhost i get "failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden"
User avatar
hiimcody1
Former staff
Former staff
Posts: 1616
Joined: Wed Dec 28, 2011 4:59 pm

Re: file_get_contents not working

Post by hiimcody1 »

file_get_contents works for me on my webhost. However using that function to call an external service is not advised. It'd be better to make a curl call so you can set headers, cookies, postVars, etc.
bomb3rman
New to forums
New to forums
Posts: 2
Joined: Tue May 19, 2015 12:35 am

Re: file_get_contents not working

Post by bomb3rman »

i tried a diferent type API, on localhost Xamp works but if i try nfo webhost same code it loads forever
Post Reply