HTTP status 200

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Jean-Yves
Forum Contributor
Posts: 148
Joined: Wed Jul 02, 2003 2:13 pm
Location: West Country, UK

HTTP status 200

Post 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
User avatar
Jean-Yves
Forum Contributor
Posts: 148
Joined: Wed Jul 02, 2003 2:13 pm
Location: West Country, UK

Re: HTTP status 200

Post 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! ;)
Post Reply