CodeAve.com CodeAve.com - ASP - Read/Write
ASP
·Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·Articles
·Miscellaneous
·Contents
·What's New?
JavaScript
CSS
HTML
Maps
Links
Mail List
Search
Sitemap


 


Impression Counter (Without a db)
What's behind an image?  Just about anything you there to be. A typical image tag (<img src="any_name_you_want.jpg">) downloads an image to be processed by the browser an image tag that references an active server page (<img src="any_name_you_want.asp">) can do most anything and output an image to be displayed as the final output to the user.  The following example will read a text document on the server and one to the current count and re-write the document to the server (to count the number of impressions) and redirect the user to an image to be displayed in the browser.  Note the url in the output example.  To view the current impression count from the text document click here.
View the Output
Text View
Print View
Mail this Link
Download the Code

<%
' name of the text document that will track the numer of impressions
count_file="impression_counter.txt"
set fso = createobject("scripting.filesystemobject")
set act = fso.opentextfile(server.mappath(count_file))
counter = clng(act.readline)
counter = counter + 1
act.close
Set act = fso.createtextfile(server.mappath(count_file), true)
act.writeline(counter)
act.Close
' redirect to the image you want to display
response.redirect "images/codeave-logo.gif" 
%>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3