0

What I want is that with a URL, my site has a URL structure like this, http://mywebsite.com/page/test.gif, the test.gif is a GET parameter, thanks to .htaccess, I undestand that I can display a regular website doing so. I also understand that I could display the image directly using a gif file PHP header. What I want is to know if there is a way to check if user is coming from direct access or if the link is embeded and then switch from one option to another.

Thanks

steps
  • 774
  • 2
  • 16
  • 38

1 Answers1

0
debug_backtrace() || die ("Direct access not premitted");

Add some HTML inside the die() command to display a webpage. I will go out on a limb and assume you don't want an entire webpage, just a message that indicates you can't use your images if requested.

Source: Here

Community
  • 1
  • 1
David
  • 3,831
  • 2
  • 28
  • 38