headline grabber php help

  • xfsunoles
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Sep 25, 2003
  • Posts: 7
  • Status: Offline

Post September 26th, 2003, 2:12 pm

Code: [ Select ]
<?php
$file = fopen("http://www.collegesports.com/teams/fsu/index.html", "r");
$rf = @fread($file, 55825);
$grab = eregi("<td width=280 valign=\"top\"><!--OAS Headlines Begin -->(.*)<!--OAS Headlines End -->", $rf, $printing);
$pre = str_replace("<span class=\"h2\">", "", $printing);
$final = str_replace("<a href=\"", "<a target=_blank href=\"http://www.collegesports.com", $pre);
echo $final;
fclose($file);
?>
  1. <?php
  2. $file = fopen("http://www.collegesports.com/teams/fsu/index.html", "r");
  3. $rf = @fread($file, 55825);
  4. $grab = eregi("<td width=280 valign=\"top\"><!--OAS Headlines Begin -->(.*)<!--OAS Headlines End -->", $rf, $printing);
  5. $pre = str_replace("<span class=\"h2\">", "", $printing);
  6. $final = str_replace("<a href=\"", "<a target=_blank href=\"http://www.collegesports.com", $pre);
  7. echo $final;
  8. fclose($file);
  9. ?>


it show a blank page. it not grabber propertly
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 26th, 2003, 2:12 pm

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 8925
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Post October 5th, 2003, 2:04 am

For the line of your script which says:

Code: [ Select ]
$file = fopen("http://www.collegesports.com/teams/fsu/index.html", "r");


I am not sure you are allowed to put URL's in there like that. I was assuming that it wants a path to a document on your server to grab. Did this script every perform the function you wanted? or are you just trying to figure it out and you were hoping putting the URL there would work?
Ozzu Hosting - Want your website on a fast server like Ozzu?

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: this213 and 164 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.