328 posts
  • Has been part of the Envato Community for over 8 years
  • Has collected 100+ items on Envato Market
  • Located in United States

So I have a flash gallery that uses .xml to pull in images.

Is it possible to still allow the .xml file to grab images but if someone would happen to go to a direct hit for example,
could I make it forbidden?

I didn’t know if there was some kinda .php script that would allow me to do this. I thought I would give it a shot and ask on here.

Thanks Everyone. Tim

99 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+3 more

PHP isn’t really the right tool to do this. What you need is some htaccess magic. http://altlab.com/htaccess_tutorial.html could help you out.

5264 posts
  • Achieved the monthly Community Superstar Award
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 6 years
  • Helped several times protecting Envato Market against copyright violations
+16 more

A bit tricky, not really possible with htaccess on it’s own.

One solution is to write a php script to allow one time links, eg:


the 1kj135rl1k23j4 would only work once.

a million possible ways to do this, one way could be to generate your xml file with php, generate a unique hash for each image, store the hash > image relationship in a php session, then in image.php you lookup the hash and spit out the image, then remove the hash from the php session. visiting the url again wouldn’t work because the hash > image map doesn’t exist any more.

epic caching and other possible problems, but should be possible.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes