*
The moose likes HTML, CSS and JavaScript and the fly likes Visitor Counter for website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Visitor Counter for website" Watch "Visitor Counter for website" New topic
Author

Visitor Counter for website

James Hambrick
Ranch Hand

Joined: Sep 04, 2004
Posts: 282

I have a company website that I want to add a visitor counter to. Its an internal website so I cant add a counter that would call anything outside of the internal website eg. sitemeter... I have tried php scripts that I found online and one java script that I found online and they seem to not do anyhting. I assume its my setup that is causing the problem. I have IIS installed(was already installed before I got here, by the last guy). This site has some jave script and PHP that actually does work. I am just trying to add a counter to the main page. it called default.htm right now. the code I was using just opens a file, reads the number, adds 1 to it,displays it on the screen and then closes it back. pretty simple except that it doesn't work.


Visit my blog! http://jameshambrick.com
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

JavaScript can't do any file access. What is? The php?

I'm not sure what you are expecting without showing the code that "doesn't work".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
James Hambrick
Ranch Hand

Joined: Sep 04, 2004
Posts: 282

I am looking for code that will work, code that will create a visitor counter.
[ August 02, 2007: Message edited by: James Hambrick ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

What will you be using for the server-side code?
James Hambrick
Ranch Hand

Joined: Sep 04, 2004
Posts: 282

on the server I have renamed the .htm file to .php4 and it runs. Seems that PHP ignored any code inside a .htm file. I have a php opening a file, adding one to the number, displaying it on the screen and then saceing and closing the file.


you can change the .htaccess file to tell php to check for php code inside of html files, but I dont have a .htaccess file and they said that it was setup by IIS. I could not find anywhere in IIS where it was setup. that's why I just renamed the file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Visitor Counter for website
 
Similar Threads
Getting Resin to ignore PHP script so that webserver deals with request
Counter
Examulator:SCWCD:JSP and Servlets
Website visitor counter
What Happened to the Visitor Counter on JavaRanch