Sinisterly
Logging ips on a website - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Design (https://sinister.li/Forum-Design)
+--- Forum: Web Design (https://sinister.li/Forum-Web-Design)
+--- Thread: Logging ips on a website (/Thread-Logging-ips-on-a-website)



Logging ips on a website - belgarrion - 07-11-2013

Is there a script of function that i can add to my site that will log the IP address of anyone who lands on that site.

I am a admin of a forum on proboards. The old version of proboards had a feature that did this automatically so you could look it over later and see who was looking at your forum. They just upgraded to version 5 and now you can only see the ips of those on at the time you look. Is there a way i can add this for her???


Logging ips on a website - belgarrion - 07-11-2013

Is there a script of function that i can add to my site that will log the IP address of anyone who lands on that site.

I am a admin of a forum on proboards. The old version of proboards had a feature that did this automatically so you could look it over later and see who was looking at your forum. They just upgraded to version 5 and now you can only see the ips of those on at the time you look. Is there a way i can add this for her???


RE: Logging ips on a website - Anima Templi - 07-11-2013

Do you have access to the server too?


RE: Logging ips on a website - Anima Templi - 07-11-2013

Do you have access to the server too?


RE: Logging ips on a website - The Alchemist - 07-11-2013

(07-11-2013, 01:20 AM)belgarrion Wrote: Is there a script of function that i can add to my site that will log the IP address of anyone who lands on that site.
Just add this to your index.php :
PHP Code:
<?php $handler = fopen("iplog.txt","a"); fwriite($handler,$_SERVER['REMOTE_ADDR']."\n"); fclose($handler); ?>
Whoever visits your website's index.php, that person's IP address gets stored in a TXT file named iplogs.txt in the same folder. You may add the code for other files too.


RE: Logging ips on a website - The Alchemist - 07-11-2013

(07-11-2013, 01:20 AM)belgarrion Wrote: Is there a script of function that i can add to my site that will log the IP address of anyone who lands on that site.
Just add this to your index.php :
PHP Code:
<?php $handler = fopen("iplog.txt","a"); fwriite($handler,$_SERVER['REMOTE_ADDR']."\n"); fclose($handler); ?>
Whoever visits your website's index.php, that person's IP address gets stored in a TXT file named iplogs.txt in the same folder. You may add the code for other files too.


RE: Logging ips on a website - belgarrion - 07-11-2013

Thanks for the help. However i do not have access to the folder to access the txt file. Is there a way to have it email to someone every 12 hours or .... i need a easy way to access it for her. a link i can add something simple for her.


RE: Logging ips on a website - belgarrion - 07-11-2013

Thanks for the help. However i do not have access to the folder to access the txt file. Is there a way to have it email to someone every 12 hours or .... i need a easy way to access it for her. a link i can add something simple for her.