0

Is there any solution that prevent an access to any content that is made to be called via fancybox iframe only?

I am using fancybox ver 2.0 and PHP as a server end programming.

Have a look for example.

<a href="feedback.php" class="feedback fancybox.iframe">Feedback</a>

Now generally when a user clicks on feedback link, fancybox will handle the request.

But I want to prevent users from accessing "feedback.php" page directly from the browser's address bar.

Dipendra Gurung
  • 5,720
  • 11
  • 39
  • 62
  • You mean something like this: http://stackoverflow.com/questions/165975/determining-referer-in-php =P – John Nov 21 '12 at 05:18

1 Answers1

0
if (!empty($_SERVER['HTTP_REFERER'])){
    header("Location: ".$_SERVER['HTTP_REFERER']);}
else {
   header("Location: index.php");
}
Raul Valverde
  • 587
  • 4
  • 11