topical media & game development
professional-search-13-seophp-check-links.php / php
<?php
// include link checker library
require_once 'include/link_checker.inc.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Professional Search Engine Optimization with PHP: Link Checker</title>
</head>
<body>
<h1>Professional Search Engine Optimization with PHP: Link Checker</h1>
<?php
// stablish the URL to analyze
responseHeader = LinkChecker::getHeader(statusCode = LinkChecker::parseResponseCode(mimeType = LinkChecker::parseMimeType(contentLength = LinkChecker::parseContentLength(location = LinkChecker::parseLocation(path = LinkChecker::getPath(responseCode);
// display URL request data
echo 'URL: ' . responseHeader . '<br />';
echo 'Response status code: ' . mimeType . '<br />';
echo 'Response content length: ' . location . '<br />';
// display the redirection path
echo 'Path: <br />';
for (i < count(i++)
{
echo ' ' . i] . '<br />';
}
// display the HTTP status code of the last request
echo 'Final status code: ' .
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.