(.*)\@i"; $matcho=1; $curo=0; if (isset($_POST['url'])) { $file = fopen ("http:" . str_replace("http:","",str_replace("https:","",str_replace("+"," ",urldecode($_POST['url'])))), "r"); $pblurb="Looking in " . str_replace("+"," ",urldecode($_POST['url'])) . " "; $cfor="for "; } else if (isset($_GET['url'])) { $file = fopen ("http:" . str_replace("http:","",str_replace("https:","",str_replace("+"," ",urldecode($_GET['url'])))), "r"); $pblurb="Looking in " . str_replace("+"," ",urldecode($_GET['url'])) . " "; $cfor="for "; } else { $file = fopen ("http://www.rjmprogramming.com.au/index.php", "r"); $cfor="Looking in " . "http://www.rjmprogramming.com.au/index.php" . " for "; } if (isset($_POST['type'])) { $pregt="@\\<" . str_replace("+"," ",urldecode($_POST['type'])) . "\\>(.*)\\@i"; $pregt="@\\>(.*)\\@i"; $pblurb.=$cfor . str_replace("+"," ",urldecode($_GET['type'])) . " element "; $cfor=" "; } else if (isset($_GET['type'])) { $pregt="@\\<" . str_replace("+"," ",urldecode($_GET['type'])) . "\\>(.*)\\@i"; $pregt="@\\>(.*)\\@i"; $pblurb.=$cfor . str_replace("+"," ",urldecode($_GET['type'])) . " element "; $cfor=" "; } else { $pregt="@\(.*)\@i"; $cfor.="title " . " element "; } if (isset($_POST['ord'])) { $matcho=intval(str_replace("+"," ",urldecode($_POST['ord']))); $pblurb.=$cfor . "number " . $matcho . " ...
"; } else if (isset($_GET['ord'])) { $matcho=intval(str_replace("+"," ",urldecode($_GET['ord']))); $pblurb.=$cfor . "number " . $matcho . " ...
"; } else { $matcho=1; $cfor.="number " . $matcho . " ...
"; } if (!$file) { echo "

Unable to open remote file.\n"; exit; } while (!feof ($file)) { $line = fgets ($file, 1024); /* This only works if the title and its tags are on one line */ if (preg_match ($pregt, $line, $out)) { $title = $out[1]; $curo++; if ($curo >= $matcho) { $blurb="$pblurb"; break; } } } fclose($file); echo "

${blurb}${title}

"; exit; ?>