Location: PHPKode > scripts > URL class > url-class/examples_url.class.php
<?php

include("url.class.php");

$url=new url("http://www.sms.de/");

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();
?>
Return current item: URL class