TIME NOW
World current time now,
CALENDAR
Calendar monthly, yearly
login GOLD PRICE, RATE
login HOROSCOPE
login DICTIONARIES, LISTS
login SCIENCE EDUCATION RELIGION
login FINANCE, BUSINESS
login WORLD COUNTRIES, WIKI

PHP scripts, code, examples, tutorial

Previous articlePage bottomNext article  ALL TOPICS

PHP. FAQ script. Clear HTML file

 
HTML files are put into youtube.txt, you need to clear atother html tags:
<?php

$a = file_get_contents( "./youtube.txt" );

$b = strip_tags( $a, "<object><embed>" );

file_put_contents( "./youtube1.txt", $b );

?>

Separate <OBJECT> with new lines:
<?php

$handle = @fopen( "youtube1.txt", "r" );

if ( $handle ) {
    while ( !feof( $handle ) ) {
        $buffer = fgets( $handle, 4096 );
        
        if ( stristr( $buffer, 'object' ) ) {

            $buffer    = str_replace( "OBJECT", "object", $buffer );
            $bufferArr = explode( "object>", $buffer );
          
            $content .= trim( $bufferArr[ 0 ] ) . "object>\n";

        } //stristr( $buffer, 'object' )
        
        
    } //!feof( $handle )
    fclose( $handle );
    
    
    file_put_contents( "youtube2.txt", $content );
    
    
} //$handle

?>
 
Previous articlePage topNext article  ALL TOPICS



 Use username: Guest, Anonymous, Programmer






QUOTES:
A knowledge of men is the prime secret of business success.
Darius Ogden Mills
The brave love mercy, and delight to save.
John Gay
A woodland in full color is awesome as a forest fire, in magnitude at least, but a single tree is like a dancing tongue of flame to warm the heart.
Hal Borland