![]() |
IP detector script
hey all
is there a free script i can get for my site which tracks incoming traffic and lists them by domain and IP so that i can avoid hitbots. I use lana and this isnt' a feature right now... So anybody can give me a code that writes to a txt or php file or something... Or whatever... thanks |
Just use your apache log files.
Better yet, rewrite your log file directive so that it logs not only the host but the x-forward-for header as well. |
hummm...
i forgot to mention i suck with writing and rewriting... anything i can download... :Graucho |
The Unattainable is Unknown at Zombo.com.
|
Quote:
How about the Apache docs. Read up on them and you'll be able to do it. |
PHP script to capture IP addies:
<?$log_file = "ip.txt"; $ip = getenv('REMOTE_ADDR'); $fp = fopen("$log_file", "a"); fputs($fp, "$iprn"); flock($fp, 3); fclose($fp); PRINT("Your IP Address .....$ip was logged.");?> You need to create a file "ip.txt". Set the attributes to 644 and use the <? php {include 'filename' ;} ?> to call the program or you can use it directly in your php page. It will write to the file and display the address on the screen. You can also make this work without it writing a file by simply using: <?$ip = getenv('REMOTE_ADDR'); PRINT("Your IP Address .....$ip was logged.");?> You can thank Ken at www.workforsex.com for the script! Regards NastyJack |
All times are GMT -7. The time now is 04:44 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123