Works Locally But Not When Uploaded To Domain

Hi guys…
OK so locally on my web server on the desktop i can get all live streams displayed for the selected game See below image

However when I upload the script to my domain it doesnt pull anything…
There are no errors being reported via PHP
The domain and the exact folder location are added to my console app url lists
So I’m really puzzled as to whats going on … the client id and secret id are defined in the page being accessed so there is no chance of these being incorrect

Because of the sensitive nature of my project I’d rather not post code here
but will happily discuss in private

If you are using file_get_contents or similar to make HTTP requests that is the issue.
fopen/fgc will be blocked for security reasons on a domain. Since cURL should be used instead.

Depending on your code you might have screamer suppression which prevents fopen/fgc reporting errors. Or just silently fails and doesn’t log for other reasons, (php.ini etc)

You should be using cURL
And testing HTTP Response Codes
And JSON decode errors

So in summary you should be using cURL

Yep using cURL and also the latest API endpoints

Then you need to update your curl code to capture HTTP respons codes and JSON errors and/or curl verbose out and debug.

ok so that was weird…
I just moved the $token = $keys->access_token ok one of the lines and its now working fine …
Strange thing is I tried teh modification locally and that caused errors but works without issues on domain …
Very odd …

Anyway resolved now many thanks for your help @BarryCarlyon

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.