I'm trying to implement a function which can check the validity of an access token provided as a parameter. To do this, I have to read the response of a simple GET request (graph.facebook.com/debug_token?xxxx).
Normally, it's pretty straightforward, but I had to write a weird function to loop through the redirects with curl (can't use curl follow redirection, because open base dir is always set on).
The method is working but I don't understand why my hosting service (000webhost) always perform a 302 redirect (which it can difficultly access the end result of) to the url error.000webhost.com.
Can you please help me solve this problem ? Especially that the response in a browser is really simple (try it at home!)...
Thank you very much.