<?php
include("url.class.php");
$url=new url("[url][/url]");
echo $url->get_header_stream();
$headers=$url->get_headers();
echo $headers['Server'];
echo $url->get_content();
echo "URL: <b>".$url->get_url()."</b><br>n";
echo "URL Host: ".$url->get_url_host()."<br>n";
echo "URL Path: ".$url->get_url_path()."<br>n<br>n";
echo "Statuscode: ".$url->get_statuscode()."<br>n";
echo "Statuscode description: ".$url->get_statuscode_desc()."<br>n";
echo "HTTP Version: ".$url->get_info_http_version()."<br>n";
echo "Server: ".$url->get_info_server()."<br>n";
echo "Content Type: ".$url->get_info_content_type()."<br>n";
echo "Date: ".$url->get_info_date()."<br>n<br>n";
echo "WHOLE HEADERS:<br>n";
echo $url->get_header_stream();
?>
一个用php实现的获取URL信息的类(2)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/ab6d9dd390e1f1ef10d5f8e8dc536d29.html