Our page is "mypage.html" and we are requesting information to complete it from "http://www.mycounter.com/hitcounter.asp" which may be located in the same or in a different site. The information provided by the second file will allow to get a text with the number of hits in our page.
mypage.html
<html>
<title>My page</title>
<body>
<script language="javascript" src="http://www.mycounter.com/hitcounter.asp"></script>
</body>
</html>
<%
Wfile="c:\mydir\cgi-bin\hitcounter.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(Wfile)
hits = Clng(a.ReadLine)
hits = hits + 1
a.close
Set a = fs.CreateTextFile(Wfile,True)
a.WriteLine(hits)
a.Close
%>
document. write ("Number of hits since 2002/01/01: <% =hits %>")