1. Home >
  2. Computers & Internet >
  3. Programming & Design >
  4. Resolved Question
moonstone84 moonston...
Member since:
June 09, 2006
Total points:
342 (Level 2)

Resolved Question

Show me another »

How can I track the IP address of visitors to my personal site?

I have a blog.
  • 3 years ago

Additional Details

my "host" is www.blogger.com , so I'ld need something external that can be plopped into my HTML. Sorry for not being explicit before.

3 years ago

sofarsogood by sofarsog...
Member since:
September 10, 2006
Total points:
6071 (Level 5)

Best Answer - Chosen by Voters

It is very easy to do if you are using PHP, I have been doing this for my online resume for years.

Rename your file from something like "file.html" to "file.php", and then put in the following code:

<?php$fp = fopen("hits", "a");
fwrite($fp, date("y/m/d H:i") . " " . $REMOTE_ADDR . "\n");
fclose($fp);
?>

This will make a file called "hits", and whenever anyone opens this file it will record the date and their IP address in the file.
  • 3 years ago
100% 1 Vote

There are currently no comments for this question.

Other Answers (4)

Answers International

Yahoo! does not evaluate or guarantee the accuracy of any Yahoo! Answers content. Click here for the Full Disclaimer.

Help us improve Yahoo! Answers. Send Feedback