Zend - The PHP Company




Miscellaneous

Add Code


BigBrother news-script  

Type: application
Added by: JokerPs
Entered: 28/03/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 7093
A News-Frontend for the news-section of the german TV reality show "BigBrother". At this time the script is only in german. if someone from outside of germany is interested in an english version, please contact me!!


<?

/*
--------------------------------------------------------------
BigBrother news-script 0.9  || http://www.phpwelt.de
Copyright (C) 2000 Mike R�bsamen <mtr@phpwelt.de>
Diese Software f�llt unter die GNU General Public License.
--------------------------------------------------------------

--------------------------------------------------------------
Bitte modifizieren Sie nur diesen Teil des Scripts
--------------------------------------------------------------
*/

    
$font        "Arial";
    
$hlcolor    "#6666ff";
    
$hlsize        3;
    
$desccolor    "";
    
$descsize    2;
    
$linktarget "_blank";

/*
--------------------------------------------------------------
Ende der Einstellungen
--------------------------------------------------------------
*/


    
$file "http://www.bigbrother-haus.de/news/day.html";

    
$fpread fopen($file,  'r');
    
    while(! 
feof($fpread) ) {

        
$zeile ltrim(Chop(fgets($fpread1024)));
    
        if ((
strstr($zeile,"</p>")) || (strstr($zeile,"</h1>"))):
    
        if (
strstr($zeile,"<a href=")):
    
            
$zeile=str_replace("<h1>","",$zeile);
            
$zeile=str_replace("<p class="hotnews">","",$zeile);
            
        
        
            
$startlink=strpos($zeile,"<");
        
            
$stoplink=strpos($zeile,">");
    
            
$link=substr($zeile,$startlink,$stoplink-$startlink+1);
        
            
$link=str_replace("<a href="/","<a href="http://www.bigbrother-haus.de/",$link);
        
            
$link=str_replace(">"," target=$linktarget>",$link);
                            
            
$zeile=strip_tags($zeile);
            
            echo 
"<font face="$font" size="$hlsize" color="$hlcolor"><b>$link $zeile</a></b></font><br>";
    
    
        else:
    
            
$zeile=strip_tags($zeile);
            
            if (
$zeile):
            
            echo 
"<font face="$font" size="$descsize" color="$desccolor"><img src=button.gif> $zeile</font><br><br>";
                        
            else:
            
            echo 
"<br>";
            
            endif;
    
        endif;

        endif;    


    }
    
    
fclose($fpread);

?>


Usage Example


See the example


Rate This Script





Search



This Category All Categories