<span class="CONTENT">example:<br><br>页面: dl.php <br>-------------------------------------------------------------------------------------- <br><?php <BR><br>$id = $_GET['id']; <br>$act = $_GET['act']; <br><br>switch($act) { <br>default : <br>case "display" : displayHTML(); break; <br>case "down" : down(); break; <br>} <br><br>function displayHTML($id) { <br>setcookie("visited", "true"); <br><br>// print your HTML. <br>} <br><br>function down($id) { <br>if(! isset($_COOKIE['visited']) ) print "你盗联?"; <br><br>$sql = "select path from TABLE where id=". $id; <br>//.............................. <br>} <br>?> <br><br><a href="dl.php?id=1&act=down">Download Now...</a></span>