Welcome to WebmasterWorld Guest from 107.22.14.254

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

CGI counter

CGI counter

     
8:44 pm on Mar 9, 2006 (gmt 0)

5+ Year Member



Hi,

I am trying to create a hidden counter. What would be the best way to create this. I know there are lots of scripts that I can use, but they are not easy to modify. I thought cgi would be the way to go but I am not sure. I want to maintain the number of hits for each page and then view them from a text file. So something like "URL of file : number of hits" should be stored in the file. Also when I include a cgi file to a .shtml page I get a 404 error, I don't know why?. I don't know how to get started or what would be the best way to create this. Thanks!

Sunny

9:47 pm on Mar 9, 2006 (gmt 0)

5+ Year Member



post the SSI tag you have been trying to use.
2:12 pm on Mar 10, 2006 (gmt 0)

5+ Year Member



Hi I am using this:

<!--#include virtual="http://10.42.13.212/cgi-bin/counter.cgi"-->

4:02 pm on Mar 10, 2006 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The URL cannot contain a scheme or hostname, only a path and an optional query string.

mod_include [httpd.apache.org]

3:01 pm on Mar 13, 2006 (gmt 0)

5+ Year Member



Thanks. Okay this is what I want to do. Our server doesn't offer support for dynamic pages so in short we cannot develop scripts on that server. We want to create a hidden counter for a .shtml page on that server and since that server doesn't support dynamic page we though we can put the script on a different server that supports scripts and then include it in the .shtml file. So...I just found out that this cannot be done. Is there anyway that I can create a hidden counter for a .shtml page on a server that doesnot support scripting of any kind. Note: I can still develop and host the scrit on a seperate server but I need a way for it to communicate to the .shtml page. Any ideas thoughts?

Thanks,
Sunny

3:16 pm on Mar 13, 2006 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



My first thought is that you are interesting in server side scripting and the powerful options you have, and that is great. However, you are hosting your site(s) with a provider that doesn't allow it, that's not great -- perhaps a new partner is something to consider? ;)

Alternatives? Well, you could always use a hidden image in your page to hit the other server with some type of query string that you could use to provide tracking.

3:52 pm on Mar 13, 2006 (gmt 0)

5+ Year Member



Well..I guess we cannot change providers since this is a corporate intranet and the organization doesn't want us to change providers because they don't understand the power of server side scripting. Anyhow, I was looking for alternatives, could you please explain on the method that you suggested(I think it is a good idea!).

Thanks again,
Sunny

10:04 pm on Mar 13, 2006 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



It's a very common approach used by site stat providers and site hit counters.

You have an image file in the page which is a reference link. It is basically a 1x1 pixel image of ... well nothing. The url leads to a script that logs the info and sends back the image, ... that never gets seen.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month