• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Visitor Counter for website

 
James Hambrick
Ranch Hand
Posts: 282
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
James Hambrick
Ranch Hand
Posts: 282
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What will you be using for the server-side code?
 
James Hambrick
Ranch Hand
Posts: 282
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic