Free php scripts

Article Submission
  • Register
  • Login

  • Tutorials/support/References
  • PHP/ASP/PERL Bookstore
  • Community
  • Chat
  • Tutorials
  • Free Smiley Icons
  • Web Hosting

  • Search

  • Chipmunk CMS
  • Forums PHP Script
  • Chipmunk Blogger Script
  • Chipmunk Topsites
  • Chipmunk Addresshost
  • Chipmunk Newsletter
  • Free Guestbook Script
  • Free Poll Script
  • Directory Script
  • Kill Monster
  • Free FFAL script
  • CMS core
  • Chat Room
  • Riddles
  • Random Links
  • Recommend Site
  • Random Quote
  • Story Lines
  • Text Counter
  • Chipmunk Live
  • Chipmunk Bloghost
  • PHP AWS script
  • pwngame
  • Books
  • Begginning PHP4
  • Professional PHP4
  • PHP Cookbook
  • Legal Stuff for scripts
  • Script Liscense

  • Top 5 hottest members

    Quality Freelancing

    Sister Sites
  • My Blog
  • Albino Freebies
  • Java gaming
  • Flashninjaclan

  • Premium Affiliates
    Counter tutorial

    This simple tutorial will explain how to program a simple text-file counter.
    Creating a simple counter requires you do three things:

  • Open up a file and read current count value.
  • Add one to the current value.
  • Read and print the new value.
    So for the this tutorial, first create a file called sample.php and put a 0 in it as a default start point.
    Now the actual code for the counter:

    //tutorial for text-file based counter
    //opens file for reading and writing
    //reads in current value
    //increment count by 1
    //input new value
    //gets new value
    print "$getrecent";
    //print counter value

    The comments are provided below each line tell what the line above does.
    First the "$counthandle" variable opens up your sample.php file which you created for reading.
    The freads function reads whatever is in sample.php and stores it in $getcurrent. fclose() closes file handles. The $counthandle1 opens up the sample.php file for writing. We already incremented $getcurrent by one before hand so now we use fputs to write the new value over the old value we had. Finally, $counthandle2 opens the new sample.php and reads the new file and stores it in the $getrecent variables. The last line simple prints whatever is in $getrecent.
    A example is provided below:

    This tutorial has been viewed 6347 times.
  • News Categories
  • Site News
  • Technology news
  • Programming news
  • Other Major News

  • Search Articles

    Make Money
    Free Blog promotion -- Get your blog syndicated on thousands of other blogs for free.

    Tutorial Categories
    Ad Managers(5)
    Chat systems(5)
    CMS systems(7)
    File Manipulation(4)
    HTML/CSS Tutorials(12)
    Link indexing/ Classifieds(6)
    Mailing Lists/E-mail(5)
    MySQL Related(9)
    PHP Basics(10)
    RSS and other feeds(5)
    XML and other parsing(3)

  • Ecommerce Website Design
  • Hotscripts
  • Boxedart
  • Zero Web
  • Edorel Free Hosting
  • Javascript Reference
  • Powerful Scripts
  • Scripts Bank
  • Finestzone Designs
  • Layouts 4 free
  • Website Resources
  • 4 templates
  • Free URL redirection
  • Web Hosting
  • Website Hosting
  • Photoshop Tutorials
  • PHP and MYSQL tutorials
  • Free Templates
  • Tutorials DB
  • Pure Graphics
  • Total Tutorials
  • Myspace Pro Designs
  • Texas Electric Service
  • Cirro Energy
  • Reliant Energy Houston

  • Random Affiliates

    More affiliates