"Fossies" - the Fresh Open Source Software Archive

Member "libs/PHPCrawler/PHPCrawlerResponseHeader.class.php" (8 Jan 2013, 1689 Bytes) of package /linux/www/SitemapCreator.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 <?php
    2 /**
    3  * Describes an HTTP response-header within the phpcrawl-system.
    4  *
    5  * @package phpcrawl
    6  */
    7 class PHPCrawlerResponseHeader
    8 {
    9   /**
   10    * Initiates an new PHPCrawlerResponseHeader.
   11    *
   12    * @param string $header_string A complete response-header as it was send by the server
   13    * @param string $source_url    The URL of the website the header was recevied from.
   14    * @internal
   15    */
   16   public function __construct($header_string, $source_url)
   17   {
   18     $this->header_raw = $header_string;
   19     $this->source_url = $source_url;
   20     
   21     $this->http_status_code = PHPCrawlerUtils::getHTTPStatusCode($header_string);
   22     $this->content_type = strtolower(PHPCrawlerUtils::getHeaderValue($header_string, "content-type"));
   23     $this->content_length = strtolower(PHPCrawlerUtils::getHeaderValue($header_string, "content-length"));
   24     $this->cookies = PHPCrawlerUtils::getCookiesFromHeader($header_string, $source_url);
   25   }
   26   
   27   /**
   28    * The raw HTTP-header as it was send by the server
   29    *
   30    * @var string
   31    */
   32   public $header_raw;
   33   
   34   /**
   35    * The HTTP-statuscode
   36    *
   37    * @var int
   38    */
   39   public $http_status_code;
   40   
   41   /**
   42    * The content-type
   43    *
   44    * @var string
   45    */
   46   public $content_type;
   47   
   48   /**
   49    * The content-length as stated in the header.
   50    *
   51    * @var int
   52    */
   53   public $content_length;
   54   
   55   /**
   56    * All cookies found in the header
   57    *
   58    * @var array Numeric array containing all cookies as {@link PHPCrawlerCookieDescriptor}-objects
   59    */
   60   public $cookies = array();
   61   
   62   /**
   63    * The URL of the website the header was recevied from.
   64    *
   65    * @var string
   66    */
   67   public $source_url;
   68 }
   69 ?>