4152 posts Community Mod Building awesome stuff for your mobile devices!
  • Community Moderator
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
+9 more
Enabled Volunteer moderator says

Hey guys. I stumbled across a problem and I need some help.

How can I make my browser automatically download a image (jpg , png, whatever) , when I access a page? So, for example. If you click www.domainname.com/index.html when the page loads the “Save As ” window to pop-up.

Can anyone help?

962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says
4152 posts Community Mod Building awesome stuff for your mobile devices!
  • Community Moderator
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
+9 more
Enabled Volunteer moderator says
This might help you: https://addons.mozilla.org/en-US/firefox/addon/3404/

I need code, not an add-on… i need to implement it on different html’s that a run from a master flash site.

This is what my customer asked from me…

So I need some sort of code, or a _get method…

218 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 100 and 1 000 dollars
  • United States
AlphaTech says

Just link the file that’s on your web server. Say I want to access a .zip file, I would put it as

<a href="www.domainname.com/uploads/file-name.zip">Download</a>

Now when the user clicks “Download”, the Save As box should pop up.

962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says
This might help you: https://addons.mozilla.org/en-US/firefox/addon/3404/

I need code, not an add-on… i need to implement it on different html’s that a run from a master flash site.

This is what my customer asked from me…

So I need some sort of code, or a _get method…

You should have said then buddy:|

4152 posts Community Mod Building awesome stuff for your mobile devices!
  • Community Moderator
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
+9 more
Enabled Volunteer moderator says
Just link the file that’s on your web server. Say I want to access a .zip file, I would put it as <a href="www.domainname.com/uploads/file-name.zip">Download</a> Now when the user clicks “Download”, the Save As box should pop up.

That’s not the problem. I understand what you say. I have a dynamic gallery, made in flash, the download button, will redirect to a blank HTML page. The idea is to save the picture on its own. So no need to click download. Should start automatically.

Understand? Any way to that?

218 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
  • Sold between 100 and 1 000 dollars
  • United States
AlphaTech says
Just link the file that’s on your web server. Say I want to access a .zip file, I would put it as <a href="www.domainname.com/uploads/file-name.zip">Download</a> Now when the user clicks “Download”, the Save As box should pop up.

That’s not the problem. I understand what you say. I have a dynamic gallery, made in flash, the download button, will redirect to a blank HTML page. The idea is to save the picture on its own. So no need to click download. Should start automatically.

Understand? Any way to that?

Oh.. sorry, I don’t know flash.

549 posts Themes and Graphics
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 100 and 499 items
  • Elite Author
  • Envato Studio (Microlancer) Beta Tester
  • Europe
  • Exclusive Author
+4 more
Bebel says

You have to change the content type in the header of the page.

Read this: http://php.net/manual/en/function.header.php But the most important part is:

“Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP . It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP /HTML file.”

by
by
by
by
by
by