What's Here?
- Members: 117,543
- Replies: 431,843
- Topics: 66,666
- Snippets: 2,394
- Tutorials: 631
- Total Online: 1,780
- Members: 69
- Guests: 1,711
Who's Online?
|
Welcome to Dream.In.Code |
|
Getting PHP Help is Easy!
Join 117,543 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 1,780 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!
|
Logs IP's of page visitors, and saves to a log HTML file.
IP's are anchored to dnsstuff.org's City from IP page.
|
Submitted By: tel0r
|
|
Rating:
 
|
|
Views: 23,008 |
Language: PHP
|
|
Last Modified: May 13, 2005 |
Instructions: Can be used within a current page, or added to a site via an IFrame. (maybe other ways to implement too?)
Auto Creates log.html,if file does not exist. |
Snippet
<?php
$logfile= '/full_path_to/log.html';
$IP = $_SERVER['REMOTE_ADDR'];
$logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='. $_SERVER['REMOTE_ADDR']. '>'. $_SERVER['REMOTE_ADDR']. '</a>';
$fp = fopen($logfile, "a");
?>
Copy & Paste
|
|
|
Reference Sheets
Bye Bye Ads
Free DIC T-Shirt
Related Sites
Monthly Drawing
Partners
Top Contributors
Top 10 Kudos This Month
|