PHP failure - HTTP wrapper not allowed

  • 1
  • Problem
  • Updated 5 years ago
I am trying to use PHP to access your API as outlined in your code samples. When I upload the PHP file to my server and open it in my browser, I receive the error below:

Warning: file_get_contents() [function.file-get-contents]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0

I do not have administrator privileges with my hosting provider, so I cannot change the PHP setting. I have tried assigning the http:// path to a variable in my PHP and passing it to the json_decode command that way, but it returns the same error.

I need to know if there is another way to access the API via PHP, as the method described in your documentation section does not work on my server, and I can't find any alternative methods anywhere in your site, including the forums.
Photo of Josefism

Josefism

  • 2 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
If someone doesn't give you a good answer here, try http://stackoverflow.com/ as well.
Photo of Josefism

Josefism

  • 2 Posts
  • 0 Reply Likes
Thanks for the suggestion. I've searched there as well, but the only related answers I could find involved changing server settings which I don't have access to with my hosting provider.
Photo of afelicioni

afelicioni

  • 227 Posts
  • 43 Reply Likes
Can you check if you're able to fetch remote URLs via the cURL extension?

http://www.php.net/manual/en/book.cur...