Solved

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

Posted on 2008-06-10
4
714 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
syedasimmeesaq earned 300 total points
ID: 21755264
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
ID: 21755276
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
ID: 21755290
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
ID: 21755418
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

688 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