'') {
$fp = fopen("refer.log","a");
if ($fp) {
fwrite($fp,date('Y-m-d H:i').' '.$_SERVER['REMOTE_ADDR'].' '.$HTTP_SERVER_VARS['HTTP_REFERER']."\n");
fclose($fp);
}
}
function startElement($parser, $name, $attrs) {
global $insideitem, $tag, $title, $description, $link, $pubdt, $display_cnt;
if ($insideitem) {
$tag = $name;
} elseif ($name == "ITEM") {
$insideitem = true;
$display_cnt++;
}
}
function endElement($parser, $name) {
global $insideitem, $tag, $title, $description, $link, $pubdt, $display_cnt, $max_display_cnt;
if ($name == "ITEM" && $display_cnt < $max_display_cnt) {
$description = str_replace(chr(226).chr(128).chr(153),'´',$description); // single tick mark
$description = str_replace(chr(226).chr(128).chr(148),'',$description);
$description = str_replace(chr(228).chr(152).chr(180),'"',$description);
$description = str_replace(chr(195).chr(169),'é',$description);
$description = str_replace(chr(194).chr(174),'®',$description);
$description = str_replace(chr(172).chr(34),'',$description);
$description = str_replace(chr(128).chr(147),'',$description);
$description = str_replace(chr(233),'é',$description); // little e with right-leaning tick
$description = str_replace(chr(180),'´',$description); // right-leaning tick
$description = str_replace(chr(194),'',$description); // right-leaning tick
$description = str_replace(chr(226),'',$description); // little a with hat
printf("%s ",trim($link),trim($title));
printf("%s","
".
($pubdt<>''?''.$pubdt.' -- ':"").
trim($description)."
");
$title = ""; $description = ""; $link = ""; $insideitem = false; $pubdt = '';
}
}
function characterData($parser, $data) {
global $insideitem, $tag, $title, $description, $link, $pubdt, $display_cnt;
if ($insideitem) {
switch ($tag) {
case "TITLE": $title .= $data; break;
case "DESCRIPTION":
$description .= $data;
$dpos = strpos($description,'--');
if ($dpos > 0) {
$description = substr($description,$dpos+2);
}
break;
break;
case "LINK": $link .= $data; break;
case 'PUBDATE':
$pubdt .= $data;
// $pubdt .= date($data,'D, j M Y G:i:s e');
// default: printf('%s',"$tag");
}
}
}
?>
Fireplace Gallery - Home Page
Welcome to Fireplace Gallery, the home of photo art and fireplaces. You will find an great selection of
Art, Electric Fireplaces, Gas Logs, Glass Doors, Fireplace Screens, Andirons, Fireplace Toolsets,
Wood Holders, and other fireplace accessories.