//© Copyright 2004-2005 Roy Boverhof, www.authorize.nl
//
// edit $owner to be able to see which spiders have visited your site
$owner = "20";
// edit $header and $footer to include your header and footer information
$robots = "\n";
$header = "";
$footer = "";
//
// do not edit anything below this line
$version = "1.02";
function start_element($parser, $element_name, $element_attrs){
switch($element_name){
case "LINK":
echo "
";
break;
case "URL":
echo "";
break;
case "URL":
echo "\" TARGET=\"_new\">";
break;
case "DESCRIPTION":
echo " | ";
}
}
function character_data($parser,$data){
echo $data;
}
if (file_exists($header)){
include $header;
}
else {
$server = $_SERVER['HTTP_HOST'];
echo "\n";
echo "\n";
echo "\n";
echo "$server : interesting links\n";
echo "$robots";
echo "\n";
echo "\n";
}
echo "";
//Initialize Parser
$parser=xml_parser_create();
//Specify Handlers to start and ending tag
xml_set_element_handler($parser, "start_element", "end_element");
//Data Handler
xml_set_character_data_handler($parser, "character_data");
//Open the Data File
$page = urlencode($_SERVER['PHP_SELF']);
$server = urlencode($_SERVER['HTTP_HOST']);
$referrer = urlencode($_SERVER['HTTP_REFERER']);
$agent = urlencode($_SERVER['HTTP_USER_AGENT']);
$fp=fopen("http://www.authorize.nl/output.php?agent=$agent&referrer=$referrer&server=$server&page=$page&version=$version&owner=$owner", "rb");
//read Data
while ($data=fread($fp, 8192)){
xml_parse($parser, $data,feof($fp)) or
die (sprintf("XML Error: %s at line %d", xml_error_string(xml_get_error_code($parser)),xml_get_current_line_number($parser)));
}
fclose($fp);
xml_parser_free($parser);
echo "
";
if (file_exists($footer)){
include $footer;
}
else {
echo "";
echo "";
}
?>