note 58840 added to reserved.variables

From: Date: Thu, 17 Nov 2005 13:01:22 +0000
Subject: note 58840 added to reserved.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-98706@lists.php.net to get a copy of this message
// Check referrer to see if it matches $domain or is blank. allow download it one or both are true else redirect to the index of folder containing the script. <?php $domain = 'host.com'; if (!(stristr($ref, $domain) === FALSE) || $ref == ""){ // allow download //add download code here. } else { //redirect to current folder eg if script is at http://www.host.com/laugh/dl.php // it would redirect to http://www.host.com/laugh/ header("Location: http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/" . $relative_url); } ?> -Richie http://phoenixonline.co.uk ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58840 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58840&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58840&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58840&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58840&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58840&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58840&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58840&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58840&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98706) next »