Solved

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

Posted on 2008-06-10
4
707 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
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP Healthcheck 2 85
Calculating number of days between two dates 7 32
How many transactions can mysql handle? 3 22
Checking if varaible is empty 6 31
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

895 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

15 Experts available now in Live!

Get 1:1 Help Now