- function getResponseCode($url) {
- return $details['http_code'];
- }
Blog Archive
Wednesday, April 28, 2010
How to get HTTP response code of HTTP request in PHP
Here the function to get the HTTP response code of a HTTP request. This function can easily be used to detect what is the status of a page that you are requesting (such as 404 - Not Found, 301 - Permenently Moved). Here is a complete reference for HTTP response codes.
Subscribe to:
Post Comments (Atom)
About Me
- Dhanushka
- I am a gradguate from Department of Computer Engineering, University of Peradeniya. I hold a BSc. Eng. (Hons) degree.
No comments:
Post a Comment