- function getResponseCode($url) {
- return $details['http_code'];
- }
Blog Archive
Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts
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.
How to Validate RSS or ATOM feed using simple PHP Script
Here a simple function to Validate Feed URL,
- function getFeedStatus ($url) {
- return "ATOM";
- return "RSS";
- } else {
- return "INV";
- }
- }
Subscribe to:
Posts (Atom)
About Me

- Dhanushka
- I am a gradguate from Department of Computer Engineering, University of Peradeniya. I hold a BSc. Eng. (Hons) degree.