- Host - Path - Statuscode (eg. 404,200, ...) - HTTP Version - Server - Content Type - Date - The whole header string of the URL 代码如下: <? /** * Class for getting information about URL's * @author Sven Wagener <[email]sven.wagener@intertribe.de[/email]> * @copyright Intertribe limited * @PHP中文社区收集整理 [url]www.phpNet.cn[/url] * @include Funktion:_include_ */ class url{
var $url=""; var $url_host; var $url_path; var $file="";
var $code=""; var $code_desc=""; var $http_version=""; // Variable for HTTP version
var $header_stream; var $header_array;
var $timeout="1";
/** * Constructor of class url * @param string $url the complete url * @desc Constructor of class url */ function url($url){ $this->url=$url;
/** * Returns the whole url * @return string $url the whole url * @desc Returns the whole url */ function get_url(){ return $this->url; }
/** * Returns the host of the url * @return string $url_host the host of the url * @desc Returns the host of the url */ function get_url_host(){ return $this->url_host; }