Sorry meant to reply to my previous post........All it does is return a blank page! "Ron" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > This is the source, which is to advanced for me to debug!!! > Waiting on their responce and maybe they can help me.....Anybody have any > clues > > <? > #--------------------------------# > # spider_cnn.php > # > # Copyright W3matter.com LLC > # http://www.w3matter.com > #--------------------------------# > # Released under the GNU > # Please keep this copyright > # notice intact. > #--------------------------------# > > > #- Spider CNN for latest headlines > > #- Fetch the page and remove newlines > $page = @join("",file("http://www.cnn.com/")); > $page = str_replace("\n","",$page); > > #- Grab the latest news segment from the page > if(preg_match("/OTHER TOP NEWS(.*?)\/other news/",$page,$match)) > { > #- Grep each headline and it's URL > if(preg_match_all('/<a href="(.*?)">(.*?)<\/a>/',$match[1],$matches)) > { > $out = "<h3>Today's CNN Headlines</h3>"; > $out .= "<font size=-1>\n"; > $out .= "<ul>\n"; > > $num = count($matches[1]); > for($x=0;$x<$num;$x++) > { > $url = "http://www.cnn.com".$matches[1][$x]; > $title = $matches[2][$x]; > $out .= "<li> <a href=$url target=blank>$title</a>\n"; > } > > $out .= "</ul>\n"; > $out .= "</font>\n"; > > echo $out; > > } > } > > ?> > > > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php