Solved

Run Cgi without displaying graphics.

Posted on 1998-04-21
9
297 Views
Last Modified: 2013-12-25
I have a counter and to get it to run now I am using the img to display the returned graphics.
However I do not want people to see my graphics.  How can I force the cgi program
to run when my page loads with out using the <img> tag. Basically not displaying anything.
Thanks,
Fuzz
0
Comment
Question by:fuz043097
9 Comments
 
LVL 2

Expert Comment

by:jaked
ID: 1827708
You can have the browser load the image but not display it with Javascript:

var a=new Image(); a.src=img;

This works in Netscape 3.0+ and Explorer 4.0+.

0
 

Author Comment

by:fuz043097
ID: 1827709
The script works fine with Explorer. But I could
not get it to update using netscape.
Any other hints to get it to work with netscape.
It would be nice if it would work for
Netscape 3.0 and explorer 3.0

0
 
LVL 5

Expert Comment

by:julio011597
ID: 1827710
That's because Netscape buffers Images got from Javascript.

You could set up a CGI that increments the counter and redirects users to the right Html page. If you like the idea, but don't know how to implement it, i could give you a few lines of C code or sh-shell code (Unix) to do the trick.
0
 
LVL 2

Expert Comment

by:squint
ID: 1827711
You can simply modify your script to return a one pixel image, and continue to use the <IMG> tag with a width and height attribute of one pixel each.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 5

Expert Comment

by:icd
ID: 1827712
Q. Do you have the ability to modify the counter script or to write your own scripts?

Q. Are you able to run SSI (Server Side Includes)

If the answer to both of these is yes then it is simple to write your own script to count page accesses which does not result in *any* output to stdout. (not even a one by one pixel).
0
 

Author Comment

by:fuz043097
ID: 1827713
I do not have access to the script so I do not have much
choice right now.  I have tried about 4 differnet java
scripts and none seem to work with both browsers right.
I would like to try and set up a hidden frame now. Not to
sure how to go about this either.
0
 
LVL 8

Accepted Solution

by:
MaDdUCK earned 150 total points
ID: 1827714
can't you just set the img tags width=0 hieght=0 border=0, then the image is invisible unless browsed with lynx.

that would be my way and it works fine.
0
 

Author Comment

by:fuz043097
ID: 1827715
I tried that but I noticed that in netscape 4.04 it
would still display the image.
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1827716
interesting...it does not on my version.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now