Jump to content

Date and IP Log


Hooo

Recommended Posts

Been searching and can't find out how to do these..

 

Just simply want them to be logged on signup and maybe login and store last 3/5 login IPs if thats possible..

 

Data also, so date registered and date last logged in.

 

Is there any suggestions on how to go about doing this? Thanks.

Link to comment
Share on other sites

NOT TESTED!

<?php
$ip = $_SERVER['REMOTE_ADDR'];
$pagina = $_SERVER['REQUEST_URI'];
$datum = date("d-m-y / H:i:s");
$invoegen = $datum . " - " . $ip . " - " . $pagina . "<br />";
$fopen = fopen("ips.html", "a");
fwrite($fopen, $invoegen);
fclose($fopen);
?>

Link to comment
Share on other sites

NOT TESTED!

<?php
$ip = $_SERVER['REMOTE_ADDR'];
$pagina = $_SERVER['REQUEST_URI'];
$datum = date("d-m-y / H:i:s");
$invoegen = $datum . " - " . $ip . " - " . $pagina . "<br />";
$fopen = fopen("ips.html", "a");
fwrite($fopen, $invoegen);
fclose($fopen);
?>

 

Dan had je het wel even in het engels kunnen zetten ;)

Link to comment
Share on other sites

Besides if you are using work from someone else shouldn't you need to be crediting them?

 

$ip = $_SERVER['REMOTE_ADDR;']; //Code provided by Ignace
echo "Your IP is: $ip";

 

You don't need to credit my work everything I do is open-source ;) But I wonder what happens if someone would post code that is copyright protected? The forum won't be held responsible so the poster is? Oh my!

Link to comment
Share on other sites

Besides if you are using work from someone else shouldn't you need to be crediting them?

 

$ip = $_SERVER['REMOTE_ADDR;']; //Code provided by Ignace
echo "Your IP is: $ip";

 

You don't need to credit my work everything I do is open-source ;) But I wonder what happens if someone would post code that is copyright protected? The forum won't be held responsible so the poster is? Oh my!

Copyrighted code does not need credit, as it's illegal to copy it in the first place?

Link to comment
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.