Build counter DIY three-step (bottom)

Source: Internet
Author: User
Keywords Build counter DIY three-step (bottom)
Medium I show you how to place the counter on the Oso on your own mirror, this article I will show you how to build your own free counter system idea, the program you have to write yo.
A lot of websites have provided free counter service, long ago I have a dream, set up their own free counter system, and now Oso provides a database, all this will become a reality.
Most of the sites are only to provide free counter to members, we can also do so, so that their own site also has some subjects, in their registration, can automatically generate an ID, our counter system depends on this ID!
When the user requests the counter, the first of course is to check the user name and password, after the successful landing, from the database to call out the user ID out, the user application after the system automatically create two files countid.php and showid.php, simple process can be as follows:
$filea = "Count". $id. " PHP ";
$fileb = "Show". $id. " PHP ";
$FPA =fopen ("count/$filea", W);
$FPB =fopen ("show/$fileb", W)
Then write the file, content and medium in the same, only with NUM change, simple process can be as follows:
Fputs ($FPA, $count, strlen ($count));
Fputs ($FPB, $show, strlen ($show));
$count the contents of the =countid.php;
$show the contents of the =showid.php;
This produces the countid.php and showid.php two files, while allowing the database to insert Num=id, and finally return a piece of code, let the user know how to use this counter, all done!
But I think the application of the counter can let the user set the initial value, the database when inserting num replace insert with replace, so that if the user forget the code, at any time can re-apply a, and set the initial value, and the counter will overwrite the original record, there is no need for users to remember the code, or provide the code to return, this is too troublesome!
What do you think? Everything is very easy, I hope you can through this three articles smoothly to create their own counter system, here I wish you success!
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.