Login   Register  
PHP Classes
elePHPant
Icontem

File: get_page.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Nadir Latif  >  Site Checker  >  get_page.php  >  Download  
File: get_page.php
Role: Auxiliary script
Content type: text/plain
Description: used to retrived the status code of a page
Class: Site Checker
Find broken links in Web site pages
Author: By
Last change:
Date: 7 years ago
Size: 556 bytes
 

Contents

Class file image Download
<?php

function RetrievePage($url)
    {
        require_once(
"http.php");
        
set_time_limit(0);
        
$http=new http_class;
        
$error=$http->GetRequestArguments($url,$arguments);
        
$error=$http->Open($arguments);
        if(
$error=="")
            {
                
$error=$http->SendRequest($arguments);
                if(
$error=="")
                    {
                        
$headers=array();
                        
$error=$http->ReadReplyHeaders($headers);
                        if(
$error=="")$status=$http->response_status;                                            
                        else 
$status=$error;
                    }
                else 
$status=$error;
                
$http->Close();
            }
        else 
$status=$error;
        return 
$status;
    }
    
?>