in the url pass two (GET) variables: hash and token generate a md5 hash from a secret string and the token (like time())...
oh your page with links to pop ups: <? $secret = "Pigs can fly i see"; $token = time(); $hash = md5($secret.$token); ?> On your popup page: <? $secret = "Pigs can fly i see"; if ( md5($secret.$_GET['token']) != $_GET['hash'] ) { echo "I'm reporting you to the police! (Please link correctly)"; exit; } ?> -js Monty wrote: > On a site that uses a popup window to display images, I want to prevent > people from hotlinking directly to the popup page because it just looks like > crap if not sized properly with controls removed. > > But I'm not sure how I can prevent someone from doing this. It appears the > HTTP_REFERER isn't always a reliable way to see if they are entering the > page from another page on your own site. And I'm not using sessions for this > site (it's not necessary). > > So, I'm a little stuck on how I can allow access to a page only from certain > other pages. Has anyone done this with PHP? > > Thanks! > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php