I've been trying to modify the follow bit of code so that it launches in a new window: target="_new". I have been thus far unable to get it to work. I've tried inserting the code into every possible position. Anyone have any ideas what I'm doing wrong?
<?
// Yahoo! NewsPod 3.0 - By Mukul Sabharwal
// Updated 23.09.2K
// What's New : (1) Code Cleanup (2) Marginally Faster (3) 100% Customizable
// Grabs news headlines from yahoo.com/index.html and stores each headline in an array, giving
// unlimited flexibility and the reduction in reading uses less memory!
// You can modify it as you like. Just don't remove my name
// PHPArena - http://phparena.tsx.org
$open = fopen("http://www.yahoo.com/index.html", "r");
$read = fread($open, 15000);
fclose($open);
$search = eregi("</b></td><td width=100%>(.*)</td></tr><tr><td align=right colspan=2><a href=r/xn><small>more...</small>", $read, $printing);
$printing[1] = str_replace("href=\"/homer/?", "href=\"", $printing[1]);
$printing[1] = str_replace("href=r/xn", "target=_new href=http://www.yahoo.com/r/xn", $printing[1]);
$printing[1] = str_replace("</td></tr><tr><td valign=top><b> ", "", $printing[1]);
$printing[1] = str_replace(" </b></td><td>", "", $printing[1]);
$printing[1] = str_replace("<small>", "", $printing[1]);
$printing[1] = str_replace("</small>", "", $printing[1]);
$content = $printing[1];
$content = explode("·", $content);
$headlines = sizeof($content);
for ($i = 0; $i < $headlines; $i++) {
print "<img src=\"2001-images/news_bullet.gif\" width=13 height=13 border=0> $content[$i]<BR>";
}
?>