[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

cgi counter on an NT system

Posted on 1998-08-25
12
Medium Priority
?
264 Views
Last Modified: 2013-12-25
I have a page on an NT system and can not get the counter script to run at all.  Does anyone know of a page with a counter on an NT system that I can look at the code where it is added into the html page and the actual script?  I would like to see the counter in action so not just a location to get some freebies off the net.  That is what I did and I have been fighting with the script for a day now.
0
Comment
Question by:csindorf
  • 6
  • 5
12 Comments
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828301
Here is the source from Microsoft Interavtice Developer Magazine... I know of no sites that use this, but many probably do...

<%
Application.Lock
sFileName = Request.ServerVariables("SCRIPT_NAME")
Application(sFileName) = Application(sFileName) + 1
Application.Unlock
%>

HTML page -----
Visits to this page equal <% =Application(sFileName) %>
0
 

Author Comment

by:csindorf
ID: 1828302
I am looking for one that is in action so I can see that it works on an NT system.  Everything that I have tried with my code failed so I would like to compair mine with another to see the difference.

TIA
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828303
This is direct from Microsoft... I will guarantee it works for NT.. But, go to www.ldsmissions.net/crm/Count/ and take a look there...  I will put up a VERY simple page with this counter...

It will be text based, but I can post some code to make it able to display graphics...

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:csindorf
ID: 1828304
The graphics version would be greatly appreciated.  I went to the page you mentioned and yes it works but what does the code look like, both the running script and the page that calls it??

TIA
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828305
The code on that page is the code that is above....

Here is the "graphics" version..

You need to have the graphics in a subdirectory called /graphics and each "number" in the directory.. For instance, 1.gif is a picture of the number 1, 2 = 2.gif... etc....

I will also post a zip file or some simple graphics...

Here is the code... It is all contained within one file....
<HTML>
<%
Application.Lock
sFileName = Request.ServerVariables("SCRIPT_NAME")
Application(sFileName) = Application(sFileName) + 1
Application.Unlock
%>

<% Accesses = Application(sFileName) %>
Page accessed
<%
For intLoop = 1 to Len(Accesses)
      CurNum = Mid(Accesses,intLoop,1)
      Response.Write("<IMG SRC=Graphics/"&CurNum & ".gif>")
Next
%>
 Times.
</HTML>

I will post thhis there too... Please be patient on the zip file... I will make a link on the same page...

0
 

Author Comment

by:csindorf
ID: 1828306
What is that done in it looks like VBScript a bit?  This system at the present time is done on an NT box but but might be going to a SUN station later on.  The server is NetScape not Microsoft      
as well.

TIA

0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828307
OK,  this is done using Active Server Pages on an NT Server... it is written in VBScript... I assumed that since you said NT, that was what you were running...

Microsoft does make server extensions for most servers to include the ASP functionality... I know they do for Netscape, but unsure for Sun...

This is the simplest way to accomplish what you want...


0
 

Author Comment

by:csindorf
ID: 1828308
That is the problem I am faced with.  the server at the present time is NT but will be going to SUN.  So I need to keep the script platform independant as much as I can.

TIA
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1828309
Well, this is all that I have... I would recommend that you move to an NT server rather than Sun... I don't know Javascript so I cannot be of any more help... Thanks anyway.

I hope the code above was worth your time.

0
 

Author Comment

by:csindorf
ID: 1828310
I am still looking for a working counter that is not done on a platform that could not be changed and put on another.  It needs to be either HTML,Perl, javascript etc......
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 240 total points
ID: 1828311
Here is THE counter script. It is in perl and will run under almost any platform

http://worldwidemart.com/scripts/counter.shtml

On NT you will also need the FLY program to create the gifs:
ftp://www.unimelb.edu.au/pub/www/tools/unix/fly/fly-1.6.0.WinNT.zip

Michel
0
 

Author Comment

by:csindorf
ID: 1828312
thanks all
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month19 days, 23 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question