i have a file with something like this which I include at the top of every
page ...

<?php
// php function to increment the counter for the current page ...
if ($hchandle = mysql_connect("server_name","username"))
{       $result = mysql_db_query("dbname","INSERT INTO hits 
                                        SET page = '$PHP_SELF', 
                                        hit_date = NOW(), 
                                        ipaddress = '$REMOTE_ADDR', 
                                        browser = '$HTTP_USER_AGENT'");
        mysql_close($hchandle);
};

?>

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Wen Ni [mailto:[EMAIL PROTECTED]]
> Sent: 02 April 2001 11:33
> To: [EMAIL PROTECTED]
> Subject: Page Counter
> 
> 
> Dear Friends,
> 
> I want to do page counter for my web site and I wonder whether PHP can
> do it or not.  I am new in PHP so can you all please give me some idea
> how to solve my problem.
> 
> Thank a lot.
> 
> regards,
> Wendy
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to