I have found this script that takes news from the bbc news website, the thing is its a nuke block and i want it to display on a page of its own (not using nuke at all) i was woundering to if it was possible for the news story to actually be displayed in my template instead of it opening the story on the bbc site?
any way heres the code
<?php
if( eregi( "block-News-BBC.php", $PHP_SELF ) )
{
Header( "Location: index.php" );
die( );
}
global $currentlang;
$file = fopen( "http://news.bbc.co.uk/1/low/world/default.stm", "r" );
$rf = fread( $file, 20000 );
$grab = eregi( "<h3>WORLD</h3>(.*)<b>AFRICA</b>", $rf, $printing );
$printing[ 1 ] = str_replace( "<div class=\"bodytext\">", "<TABLE WIDTH=\"100%\" CELLPADDING=\"0\" CELLSPACING=\"0\"><TR><TD VALIGN=\"TOP\" WIDTH=\"1\" ALIGN=\"LEFT\">» </TD><TD ALIGN=\"LEFT\" WIDTH=\"100%\">", $printing[ 1 ] );
$printing[ 1 ] = str_replace( "</div>", "</TD></TR></TABLE>", $printing[ 1 ] );
$printing[ 1 ] = str_replace( "<span class=\"h2\">", "", $printing[ 1 ] );
$printing[ 1 ] = str_replace( "<a href=\"", "<A target=_blank HREF=\"http://news.bbc.co.uk", $printing[ 1 ] );
$printing[ 1 ] = str_replace( "/low/", "/hi/", $printing[ 1 ] );
$printing[ 1 ] = str_replace( "</span>", "", $printing[ 1 ] );
$printing[ 1 ] = str_replace( "<br>", "", $printing[ 1 ] );
$printing[ 1 ] = str_replace( "<hr>", "", $printing[ 1 ] );
$pos = 0;
while ( !strpos( $printing[ 1 ], "</a>", $pos ) == false )
{
$pos = strpos($printing[ 1 ], "</a>", $pos ) + 4;
if (!strpos($printing[ 1 ], "<br clear=", $pos ) == false )
{
$pos1 = strpos($printing[ 1 ], "<br clear=", $pos ) - $pos + 16;
}
else
{
$pos1 = strpos($printing[ 1 ], "<!-- EOF -->", $pos ) - $pos;
}
$printing[ 1 ] = substr_replace( $printing[ 1 ], "", $pos, $pos1 );
}
fclose( $file );
$content = $printing[ 1 ]."<p align=\"center\"><a href=\"http://news.bbc.co.uk\" target=\"_blank\"><img border=\"0\" src=\"images/blocks/bbcnews.gif\"></a></p>";
?>