[wd_asp elements=’search’ ratio=’100%’ id=1]

Hotlinking – Stop remote posting from another form

22nd June 2014

Php - Miscellaneous

php codehaven

Add to top of page to prevent remote postings coming from another form, maybe ignoring your validations, and can post to database and shouldn’t be able to….!

echo $ref = $_SERVER['HTTP_REFERER'];
if($ref !== 'http://localhost/goodpage.php') {
die("Hotlinking not permitted");
}