Hi,
Could somebody point me to the correct/best way to retrieve the status of an http response.
i.e., I need to check that the code is 200 (OK) and raise a warning within the application's logs otherwise.
I had a quick scan through the manual but the documentation for HTTPResponse seems rather spartan. Am I even looking in the right section/ right class definition?!
(Sorry, it's been some time since I've used PHP's advanced features - been mostly doing database work these last 12 months)
Many thanks
Jean-Yves
HTTP status 200
Moderator: General Moderators
Re: HTTP status 200
Update: We are getting the response from a web service, if that makes any difference?
Would the $http_response_header super-global be set after a call to a web-service, with the values supplied by the web service response?
i.e. can we use that without having to issue a file_get_contents()?
I'm confusing myself - hopefully it's clearer to you lot!
Would the $http_response_header super-global be set after a call to a web-service, with the values supplied by the web service response?
i.e. can we use that without having to issue a file_get_contents()?
I'm confusing myself - hopefully it's clearer to you lot!