![]() |
|
How to make a image IP Logger - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: PHP (https://sinister.ly/Forum-PHP) +--- Thread: How to make a image IP Logger (/Thread-How-to-make-a-image-IP-Logger) |
How to make a image IP Logger - OverFloow - 06-07-2014 How to make an Image IP-LOGGER --------------------------------------------------- Ok so first you need 4 files: .htaccess image.png iplogger.php logger.html --------------------------------------------------- For .htaccess put this RewriteEngine on RewriteRule ^image.png$ iplogger.php --------------------------------------------------- For iplogger.php put this PHP Code: <?php
$log = 'logger.html';
$ip = $_SERVER['REMOTE_ADDR'];
$page = $_SERVER['REQUEST_URI'];
$refer = $_SERVER['HTTP_REFERER'];
$date_time = date("l j F Y g:ia", time() - date("Z")) ;
$agent = $_SERVER['HTTP_USER_AGENT'];
$fp = fopen("logger.html", "a");
fputs($fp, "
<b>$date_time</b> <br> <b>IP: </b>$ip<br><b>Page: </b>$page<br><b>Refer: </b>$refer<br><b>Useragent:
</b>$agent <br><br>
");
flock($fp, 3);
fclose($fp);
?>--------------------------------------------------- For logger.html put this PHP Code: <b>IP LOGGS</b><br />
<br />
###########################################<br />
<br />
--------------------------------------------------- Dont change image.png --------------------------------------------------- [NOTE] image.png can be anything it doesnt matter any picture RE: How to make a image IP Logger - jasiubor - 03-28-2018 Doesn't work :/ Do I need to give to .php file any permissions ? I am 100% sure I did what u did here correctly, it is my 4th try of image ip logger, others don't work too. RE: How to make a image IP Logger - mothered - 03-28-2018 (03-28-2018, 07:29 PM)jasiubor Wrote: Doesn't work :/ Do I need to give to .php file any permissions ? I am 100% sure I did what u did here correctly, it is my 4th try of image ip logger, others don't work too. Please do not grave dig threads. The OP hasn't been active for almost the same time as the thread's creation date, so don't expect an answer anytime soon (If ever). RE: How to make a image IP Logger - Esoterith - 05-07-2018 (03-28-2018, 07:29 PM)jasiubor Wrote: Doesn't work :/ Do I need to give to .php file any permissions ? I am 100% sure I did what u did here correctly, it is my 4th try of image ip logger, others don't work too. This version is insecure also If you'd like I could make a more improved one with MySQL. If so DM me. No more replies should be made to this thread. RE: How to make a image IP Logger - 413 - 06-20-2018 Great post man, You beat me to it, I was going to make a similar post about image ip logging.
|