Page 1 of 1

HTTP status 200

Posted: Fri May 30, 2008 3:40 am
by Jean-Yves
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

Re: HTTP status 200

Posted: Fri May 30, 2008 3:45 am
by Jean-Yves
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! ;)