dezkit Posted March 26, 2008 Share Posted March 26, 2008 how do i put the ipaddress of the person in the comment, where it says (ip) <?php $banned_ip = array(); $banned_ip[] = 'xx.xxx.xx.xxx'; foreach($banned_ip as $banned) { $ip = $_SERVER['REMOTE_ADDR']; if($ip == $banned){ echo "<br><br><br><br><br><br><br><br><center><font size='+2'>You have been banned from this site.</font><br>For further information about your ban, please email us at [email protected] and remember to include your IP Address<br><br>Your IP Address is (ip)"; exit(); } } ?> Link to comment https://forums.phpfreaks.com/topic/98055-php-ip-ban/ Share on other sites More sharing options...
rofl90 Posted March 26, 2008 Share Posted March 26, 2008 echo $_SERVER['REMOTE_ADDR']; Link to comment https://forums.phpfreaks.com/topic/98055-php-ip-ban/#findComment-501705 Share on other sites More sharing options...
dezkit Posted March 26, 2008 Author Share Posted March 26, 2008 can you put in the code, i sux lol, thanks. Link to comment https://forums.phpfreaks.com/topic/98055-php-ip-ban/#findComment-501706 Share on other sites More sharing options...
dezkit Posted March 26, 2008 Author Share Posted March 26, 2008 nevermind, i got it thanks Link to comment https://forums.phpfreaks.com/topic/98055-php-ip-ban/#findComment-501708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.