Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
dcasmr
Worker
Worker


Joined: Feb 06, 2004
Posts: 147

PostPosted: Sun Jan 09, 2005 12:33 pm Reply with quote

I am trying to put some headlines of the french section of BBC news in a block. I attempted to hack the existing BBC news block with no success.
The URL for that page is Only registered users can see links on this board! Get registered or login! It looks to me that the structure of the titles on that URL does not allow a block that automatically displays the current headlines.

I am willing to use iframe and contents to add manually some of the headlines.

Quote:
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/", "rb");
$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://www.bbc.co.uk/french/\" target=\"_blank\"><img border=\"0\" src=\"images/blocks/bbcnews.gif\"></a></p>";

?>




My iframe attempt which does not display well.

<?php

Code:
if (eregi("block-Search.php", $_SERVER['PHP_SELF'])) {

    Header("Location: index.php");
    die();
}

$content  .= "<iframe src=\"http://www.bbc.co.uk/french/\" name=\"Faso\" scrolling=\"no\" frameborder=\"no\" align=\"top\" width=\"143\" height=\"275\">";
$content  .= " . \</iframe>";
$content  .= "<center><a href=\"http://www.bbc.co.uk/french/highlights/story/2004/12/041221_miss_pog_bedre.shtml\" target=_blank>Burkina</a></center>";
?>
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©