Hi, can anyone spot any glaring error(s) in the below script - I'm trying to get just the first 'links' printed out from a test source. There are no errors coming up - just a blank page so I don't know what wrong;
Source page http://www.chillisauce.co.uk/testfrom.htm
Code being used:
<?
########################
Mandatory Setting
########################
$GrabURL = "http://www.chillisauce.co.uk/testfrom.htm"; //- Complete URL of the page your grabbing from!
$GrabStart = "<!--This is where I want the grab to start -->";
$GrabEnd = "<!--This could be used as grab end -->";
$Linkstart = "<p>";
$Linkend = "<br>";
$Textstart = "<font color";
$Textend = "</p>";
$Numberoflinkstoprint = "3";
########################################
Edit str_replace if required below
########################################
$file = fopen("$GrabURL", "r");
$rf = fread($file, 20000);
$grab = eregi("$GrabStart(.)$GrabEnd", $rf, $printing);
// $printing[1] = str_replace("", "", $printing[1]);
$pieces = explode("$Linkstart", $printing[0]);
$count=count($pieces);
for($x=1;$x<=$Numberoflinkstoprint;$x++){
eregi("$Linkstart(.)$Linkend",$pieces[$x],$Links );
eregi("$Textstart(.*)$Textend",$pieces[$x],$Text );
echo $Links[1];
//echo$Text [1]; Unmark this line to print text
}
fclose($file);
####################
End of Script
####################
?>