WEB COUNTER 2 - found a script, won't work :)
Posted: Sun Oct 09, 2005 4:43 am
Hi,
I have found a great hit counter script at http://www.phpjunkyard.com/php-text-hit-counter.php
Ok, so I did as it says. I've got my hands on a domain, made a subfolder in it called "ps", and another folder in it called "logs".
http://www.elena-antimonova.com/ps/
copied the counter.php into the ps folder and made an index.html file
The line
<SCRIPT LANGUAGE="Javascript" SRC="http://www.elena-antimonova.com/ps/coun ... ndex"><!--
//--></SCRIPT>
seems correct, yet it won't work!
See http://www.elena-antimonova.com/ps/
And if I try to access the http://www.elena-antimonova.com/ps/counter.php file, it says
Warning: fopen(logs/.log): failed to open stream: Permission denied in /home/elenaant/public_html/ps/counter.php on line 66
Can't open/write the log file, please CHMOD logs folder to 777 (rwx-rwx-rwx)!
What would you suggest?
Thanx!
I have found a great hit counter script at http://www.phpjunkyard.com/php-text-hit-counter.php
Code: Select all
>> Quick installation
Upload counter.php file into a folder in your public directory (where the rest of your website is; usually "public_html", "www" or "site").
Example: /public_html/counter
Corresponding URL: http://www.yourdomain.com/counter/counter.php
Within the same folder create a new folder called "logs" (on many servers names are CaSe SeNsiTiVE). Make sure this folder is world-writable (on UNIX servers issue command CHMOD 777 (rwx-rwx-rwx))
Example: public_html/counter/logs
Now to make your counter work just use this piece of code on your site:
<SCRIPT LANGUAGE="Javascript" SRC="http://www.domain.com/counter/counter.php?page=PAGENAME"><!--
//--></SCRIPT>
Change the SRC parameter accordingly (to your counter.php URL)! Change PAGENAME to a unique name for each page you want track hits on (use numbers and letter only, no spaces or other chars).
Example:
On index.html you would use http://www.domain.com/counter/counter.php?page=index
On someotherpage.html you would use http://www.domain.com/counter/counter.php?page=otherpage
etc...http://www.elena-antimonova.com/ps/
copied the counter.php into the ps folder and made an index.html file
Code: Select all
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p>*******************************</p>
<p>
TEST</p>
<p>
<SCRIPT LANGUAGE="Javascript" SRC="http://www.elena-antimonova.com/ps/counter.php?page=index"><!--
//--></SCRIPT>
</p>
<p>*******************************</p>
</body>
</html>The line
<SCRIPT LANGUAGE="Javascript" SRC="http://www.elena-antimonova.com/ps/coun ... ndex"><!--
//--></SCRIPT>
seems correct, yet it won't work!
See http://www.elena-antimonova.com/ps/
And if I try to access the http://www.elena-antimonova.com/ps/counter.php file, it says
Warning: fopen(logs/.log): failed to open stream: Permission denied in /home/elenaant/public_html/ps/counter.php on line 66
Can't open/write the log file, please CHMOD logs folder to 777 (rwx-rwx-rwx)!
What would you suggest?
Thanx!