Fun EZ thing to do when your bored

hatedguilt

Baseband Member
Messages
43
Fun things to do when your bored, just start making really ez random php scripts then see how many hits you can get
PHP:
<?php
$a = rand(0, 500);
$b = rand(0, 4000);
echo "You have $a bloobies and $b poopies";
echo "<br>You have surrious probs bro<br><br>This many people visited the page<br>";
include 'counter.php';
?>
:) sounds fun doesnt it
my ez fun page
 
PHP:
<?php 
    // Change this if you rename your counter.txt file 
    $counter_file = "counter.txt"; 
     
    // Get the contents of the current counter file 
    if($f = @fopen($counter_file, "r")) 
    { 
        @$contents = fread($f, @filesize($counter_file)); 

        @fclose($f); 
    } 
     
     
     
    // File is empty 
    if($contents == "") 
    { 
        $contents = 0; 
    } 
     
    // File contents is not a number 
    if(!is_numeric($contents)) 
    { 
        print "Counter contents is not a number."; 
        define('ERROR', 1); 
    } 
     
     
     
    // Bump the count 
    if(ERROR <> 1) 
    { 
        $contents++; 
         
        // Add contents back to file 
        if($f = @fopen($counter_file, "w")) 
        { 
            @fwrite($f, $contents); 
            @fclose($f); 
        } 
     
        // Print the contents 
        print $contents; 
    } 

?>
 
the file will create a text fie counter.txt when it's first run, so there is no real need to manually create it.
 
ya welll... its ezier to just create it :) <--> do u wanna know why <-->
sumtimes it feels good to just do something manually
 
Back
Top Bottom