Back to the index page  
Log in to check your private messages
Thiết lập firewall bằng PHP

 
Post new topic   Reply to topic    hoabinh province Forum Index » Internet ?
View previous topic :: View next topic  
Author Message
Leek
Site Admin

Joined: 13 Aug 2006
Posts: 5

PostPosted: Sun Aug 13, 2006 3:35 pm    Post subject: Thiết lập firewall bằng PHP Reply with quote
1 firewall đơn giản nhằm ngăn chặn ddos = xflash ngoài cách dùng .htaccess rưá»m rà + vướng víu . Trước tiên bạn phải include trong file index.php cá»§a site bạn đến filewall . Nếu dùng IBF thì add nó ngay dưới .

CODE
//===========================================================================
// MAIN PROGRAM
//===========================================================================

$INFO = array();


CODEinclude "firewall.php";

Sau đó tạo 1 file .php có tên là firewall.php như sau

CODE
<?php

//echo "<pre>";
//print_r($_SERVER);

if (!isset($_SERVER['HTTP_REFERER']))
{
// print error message and
die( "
<html>
<head>
<title>Anti-DoS</title>
</head>
<body style='background-color:black;color:white'>
<center><br/><br/><br/><br/><br/>
Click here :<br/>
<a style='color:yellow' href='{$_SERVER['REQUEST_URI']}'>http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}</a><br>
<font color='ffffff'><b>W e l c o m e t o</b></font><br>
<font color='white'><b> . : : Yahoo-69 : : .</b></font><br>
</center><br>

</body>
</html>
");
}


?>



Chúc thành công
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    hoabinh province Forum Index » Internet ? All times are GMT - 12 Hours


Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum