Solved

Using PHP to track web visitors IP addresses and info in MySQL database?

Posted on 2008-06-10
4
706 Views
Last Modified: 2008-06-14
Hello everyone,

I want to track all the visitors to a certain page of a website in a database.  I want to record their IP addresses, time of visit and any other information I can gather using any method possible.  I am using PHP and MySQL.  What recommendations do you all have for logging as much information I can in the database everytime they visit a particular page.

Thanks!!
0
Comment
Question by:parlays
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
syedasimmeesaq earned 300 total points
Comment Utility
you could use
$ipadd = $_SERVER['REMOTE_ADDR']; to get ip address and then use timestamp to get time for their visit.
Thanks
0
 

Author Comment

by:parlays
Comment Utility
Nice!! Thanks, how about getting advanced information, is there a good 3rd party service or something?
0
 
LVL 4

Assisted Solution

by:albuitra
albuitra earned 200 total points
Comment Utility
review at http://pear.php.net/
there are some libraries you could use
http://pear.php.net/package/Log
0
 
LVL 9

Assisted Solution

by:syedasimmeesaq
syedasimmeesaq earned 300 total points
Comment Utility
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now