Search results for 'Block IP address'. 1 post(s) found.
- 2007/10/16 How to ban / block IP addresses
This example gets the users IP address and exits the page if it matches a banned number.
<?php
//Set banned IP
$banned = '123.123.123.123';
//get user IP address
$userip = $_SERVER['REMOTE_ADDR'];
//check for banned IP address
if($userip == $banned){
echo "<BR>This IP address has been banned";
exit();
}
//continue with script...
?>
//Set banned IP
$banned = '123.123.123.123';
//get user IP address
$userip = $_SERVER['REMOTE_ADDR'];
//check for banned IP address
if($userip == $banned){
echo "<BR>This IP address has been banned";
exit();
}
//continue with script...
?>
Another posts included in "PHP"
| email validation, simple (0) | 2007/10/16 |
| How to get current filename as variable ? (0) | 2007/10/16 |
| How to redirect browser in PHP ? (0) | 2007/10/16 |
| for loop - simple (0) | 2007/10/16 |
| form action - detect form post (0) | 2007/10/16 |
| How to make random number ? (0) | 2007/10/16 |
| How to force cookies, disable php sessid in URL ? (0) | 2007/10/16 |
| How to check if a file exists ? (0) | 2007/10/16 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 02:49
moneyideas
-
Subject different money making ideas
2010/01/29 11:29
moneyideas
-
Subject different money making ideas
2010/01/31 16:42
moneyideas

Prev

Rss Feed