Im a newbie in php. I need a code to not allow users to go directly to a link. Im not talking about hotlink protection through my cpanel. But what I want to have is: users have to go to a "first page", before they can access the "actual page". For example, the link I want to protect is: link.php. I want it so that they always have to pass through pass.php before they can go to link.php. When they go directly to link.php (by either entering the url or clicking a link of that page on another site), they would be redirected to pass.php. How can I do this?
I know there's a code for this that I have used before. It's like the php code checks the browsers url in order to do this... But I forgot how to do it.