headline grabber php help

  • xfsunoles
  • Newbie
  • Newbie
  • xfsunoles
  • Posts: 7

Post 3+ Months Ago

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
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9092
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

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?

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 71 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.