Need Help tweaking BBC News block

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Need Help tweaking BBC News block
dcasmr
CZ Newbie
 Codezwiz Site Donator
dcasmr has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Oct 25, 2004
0.00 posts per day
Posts: 26
Points: 1,961
   
I am trying to display the FRENCH version of the BBC news related to Africa. It looks like the layout of the page does not allow parsing of the titles to include in the Block. Is it possible to use keywords instead for listing in the block. Example: *BURKINA* , *COTE* , *MALI*, etc...
p.s. I have tried various URL(s) in the block below with no success.




The French page is only accessible here:
[ Register or login to view links on this board. ]

if( eregi( "block-News-BBCFRENCH.php", $PHP_SELF ) )
{
   Header( "Location: index.php" );
   die( );
}

global $currentlang;

$rf = file_get_contents("http://www.bbc.co.uk/french/");
   $grab = eregi( "<a name=\"startcontent\"></a>(.*)BURKINA", $rf, $printing );
   $printing[ 1 ] = str_replace( "<a name=\"startcontent\"></a>", "<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 ] );
   $printing[ 1 ] = str_replace( "<p>", "", $printing[ 1 ] );

   $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>";


?>



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum