Jump to content

Recommended Posts

What's Up?

 

OK, So i currently use this script off the internet.

 

<?php
$logfile= 'logged.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"); 
fwrite($fp, $logdetails);
fwrite($fp, "<br>");
fclose($fp);
?>

 

But i'll be getting loats of visits from the same IP, So instead of trolling thorough some sort of text dungeon i wondered if there was a way to update the prevoius entry of that iP, So if a new IP visited then it would be logged to a new line but if the same one visited it would just update the time and date.

Link to comment
https://forums.phpfreaks.com/topic/175416-ip-logging/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.