PHP头条
热点:

如何在PHP程序中防止盗链


example:

页面: dl.php
--------------------------------------------------------------------------------------

$id = $_GET['id'];
$act = $_GET['act'];

switch($act) {
default :
case "display" : displayHTML(); break;
case "down" : down(); break;
}

function displayHTML($id) {
setcookie("visited", "true");

// print your HTML.
}

function down($id) {
if(! isset($_COOKIE['visited']) ) print "你盗联?";

$sql = "select path from TABLE where id=". $id;
//..............................
}
?>

Download Now...

www.phpzy.comtrue/phpyy/11134.htmlTechArticle如何在PHP程序中防止盗链 example: 页面: dl.php -------------------------------------------------------------------------------------- $id = $_GET['id']; $act = $_GET['act']; switch($act) { default : case "display" : displayHTML()...

相关文章

相关频道:

PHP之友评论

今天推荐