$agelimit) { $url = parse_url($rdf); $fp = fsockopen($url['host'], "80", &$errno, &$errstr, $timeout); if (!$fp) return; //just quit on error else { $local = @fopen($cachefile, "w"); if (!$local) return; //just quit on error fputs($fp, "GET " . $url['path'] . " HTTP/1.1\r\nHost: " . $url['host'] . "\r\n\r\n"); while(!feof($fp)) fwrite($local, fgets($fp, 128)); fclose($local); } } } function makebullet($item) { $check = preg_match ( "/\/", $item); $link = ereg_replace(".*","",$item); $link = ereg_replace(".*","",$link); $title = ereg_replace(".*","",$item); $title = ereg_replace(".*","",$title); if ($check) { $desc = ereg_replace(".*","",$item); $desc = ereg_replace(".*","",$desc); } if ($title) echo "
  • $title\n"; } function makebullet3($item) { $check = preg_match ( "/\/", $item); $link = ereg_replace(".*","",$item); $link = ereg_replace(".*","",$link); $title = ereg_replace(".*","",$item); $title = ereg_replace(".*","",$title); if ($check) { $desc = ereg_replace(".*","",$item); $desc = ereg_replace(".*","",$desc); } if ($title) echo "$title
    \n"; } function makebullet2($item) { $check = preg_match ( "/\/", $item); $link = ereg_replace(".*","",$item); $link = ereg_replace(".*","",$link); $title = ereg_replace(".*","",$item); $title = ereg_replace(".*","",$title); if ($check) { $desc = ereg_replace(".*","",$item); $desc = ereg_replace(".*","",$desc); } if ($title && $desc) echo "
  • $title
    \n$desc"; elseif ($title) echo "
  • $title\n"; } function listrdf($cachefile, $maxlinks = -1) { $fp = @fopen($cachefile, "r"); if (!$fp) return; //just quit on error $pagetext = fread($fp, filesize($cachefile)); fclose($fp); // kill the crud at the top and bottom $pagetext = ereg_replace("","",$pagetext); $pagetext = ereg_replace("",$pagetext); if (($maxlinks == -1) || ($maxlinks > sizeof($items))) $maxlinks = sizeof($items); for ($i = 0; $i < $maxlinks; $i++) makebullet($items[$i]); } function listrdf3($cachefile, $maxlinks = -1) { $fp = @fopen($cachefile, "r"); if (!$fp) return; //just quit on error $pagetext = fread($fp, filesize($cachefile)); fclose($fp); // kill the crud at the top and bottom $pagetext = ereg_replace("","",$pagetext); $pagetext = ereg_replace("",$pagetext); if (($maxlinks == -1) || ($maxlinks > sizeof($items))) $maxlinks = sizeof($items); for ($i = 0; $i < $maxlinks; $i++) makebullet3($items[$i]); } function listrdf2($cachefile, $maxlinks = -1) { $fp = @fopen($cachefile, "r"); if (!$fp) return; //just quit on error $pagetext = fread($fp, filesize($cachefile)); fclose($fp); // kill the crud at the top and bottom $pagetext = ereg_replace("","",$pagetext); $pagetext = ereg_replace("",$pagetext); if (($maxlinks == -1) || ($maxlinks > sizeof($items))) $maxlinks = sizeof($items); print ""; } function makenobullet($item) { $link = ereg_replace(".*","",$item); $link = ereg_replace(".*","",$link); $title = ereg_replace(".*","",$item); $title = ereg_replace(".*","",$title); if ($title) echo "$title\n"; } function viewrdf($cachefile, $maxlinks = -1) { $fp = @fopen($cachefile, "r"); if (!$fp) return; //just quit on error $pagetext = fread($fp, filesize($cachefile)); fclose($fp); // kill the crud at the top and bottom $pagetext = ereg_replace("","",$pagetext); $pagetext = ereg_replace("",$pagetext); if (($maxlinks == -1) || ($maxlinks > sizeof($items))) $maxlinks = sizeof($items); for ($i = 0; $i < $maxlinks; $i++) makenobullet($items[$i]); } ?>