Free Scripts

 Banner Ads Chat Form Processor GuestBook MailFile PostCard
Free Snippets

 Description This script will include a simple text counter on the page of your choice. The scripts do not require a database of any kind. Text Counter in PHP Just include the following code where you want to include a file in a .php file.  Text Counter in ASP Use the following code to include a counter in your page in ASP. Create the file counter.txt with nothing but the number 0 in it before you try to use the following script  <% Set oFSO = Server.CreateObject("Scripting.FileSystemObject") Set oFile = oFSO.OpenTextFile("C:\path\to\counter.txt") oldNumber = CLng(oFile.ReadLine) 'read the current count out of the file oFile.Close 'close the file because we're done reading it oldNum = oldNum + 1 'add 1 to the current counter number Set oFile = oFSO.OpenTextFile("C:\path\to\counter.txt",2,true) oFile.WriteLine(oldNum) 'write the new counter value to file oFile.Close 'close the file Response.Write(oldNum & " visitors so far.") %>