Code
function makehtml() { $header = file( 'header.src' ); for ( $i = 0; $i < count($header); $i++ ) { if ( preg_match( "/\[textarea\]/i", $header[$i] )) { fill_text_area(); } elseif ( preg_match( "/\[title\]/", $header[$i] )) { echo "
" . $GLOBALS["content"] . "
\n"; } elseif ( preg_match( "/\[counter\]/", $header[$i] )) { counter_add(); } else { $line = ($header[$i]); echo $line; } } } function counter_add() { $hits = 0; $counterdb = 'counter'; $handle = fopen( $counterdb, 'r'); $currenthits = fread($handle, filesize($counterdb)); fclose( $handle ); $currenthits = $currenthits + 1; $handle = fopen( $counterdb, 'w'); fwrite( $handle, $currenthits ); echo "
\n"; echo "
" . $currenthits . "
\n"; } function fill_text_area() { $stuffing = file( $GLOBALS["content"] ); echo "
\n"; for ( $i = 0; $i < count( $stuffing ); $i++ ) { echo ($stuffing[$i]); } }
Navigate
Home
Projects
View Source
Resume
Notepad
About
832