Unstoppable Domains โ€” Get your daily AI drops report

Graphical Hit Counter Challenge ( PHP )

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch
Status
Not open for further replies.

deadserious

Established Member
Impact
6
The Challenge

To create a graphical hit counter with PHP.

Guidelines
1. You may not use more than 15 lines of code.

2. You must use 10 separate images as the graphics. (ex: 0.gif, 1.gif, 2.gif, 3.gif, 4.gif, 5.gif, 6.gif, 7.gif, 8.gif, 9.gif )

3. The counter must successfully count to 100 without any errors or broken images.

NOTES:
Attached below is a set of images for you to use if you'd like.

Each semicolon will be counted as a new line, so you can't just put all the code on one line like: <?php code; more code; code; ?>

New lines that are just white space will not be counted as lines.

HINT
There may be some code on this forum that will help you.

The first person to post the code that meets all the above requirements in this thread will be the winner!

The reward will be your choice of $10.00 cash delivered via paypal or a one year domain registration of any .com, .net, or .org domain name.

Ask here if you have any questions.

Once we have a winner current members can work on improving and/or fixing the code and we'll then add it to the code forum for download.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
PHP:
<?php
        $exist_file = @fopen("count.dat", "r");
        $new_count = @fgets($exist_file, 255);
        $new_count++; @fclose($exist_file);
        $exist_count = @fopen("count.dat", "w");
        @fputs($exist_count, $new_count);
        @fclose($exist_count);
   $i = 0;
   while (substr($new_count,$i,1) != NULL)
   {
        $number = substr($new_count,$i,1);
        echo "<img src="$number.gif" alt="$number" border="0">";
        $i++;
   }   
?>
 
0
•••
btw, there must be a count.dat file.
 
0
•••
Working on checking out your code now. It'll be a bit, but I'll have you an answer here within the hour, so you've still got time to work on it if needed. :D
 
0
•••
Well i've got to go study and decide on a Domain Name... i'm trying to decide between Sucksadapenis.com (see thread) or a serious domain...
 
0
•••
And we have a winner! Your code seems to meet all of the above requirements. So DarkDevil is the official winner. :D

By the way, DarkDevil I really wouldn't recommend that domain you mentioned above as a domain. Anyhow I'll be sending you a pm to explain how to claim your reward. Nice Job! :)
 
0
•••
0
•••
Any ideas about what type of name you want?
 
0
•••
well... i'm trying to avoid the word's Uber, and Pixel. along with all other 1337 talk.
I was thinking using the word project... ProjectAux.com was an idea.. but the definition of the word Auxiliary isn't close to what i had in mind for the site. I was also thinking of www.About-Blank.com but its taken. plus... that About:Blank concept has been used by aboutblank.net and all those other ones...
Its gonna be a general Project site... Everything from Computer Modding, to Programming, and stuff like putting Wheels on a GT Snowracer for summer usage. Any ideas?
 
0
•••
Status
Not open for further replies.
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back