note 71986 deleted from function.parse-url by didou

From: Date: Sat, 03 Feb 2007 03:05:31 +0000
Subject: note 71986 deleted from function.parse-url by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122608@lists.php.net to get a copy of this message
Note Submitter: Allen Panclape ---- Here is a quick and easy function for checking that forms were sent from your site. <?php function checkform() { $referer=parse_url(getenv("HTTP_REFERER")); $referer=$referer['host']; $thissite=$_SERVER["SERVER_NAME"]; if($referer!=$thissite) { print "Hacking attempt failed"; exit; } } ?>

« previous php.notes (#122608) next »