4948 posts Community Mod Building awesome stuff for your mobile devices!
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
  • Author Level 8
+17 more
Enabled
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?

971 posts
  • 6 Years of Membership
  • Author Level 5
  • Collector Level 4
  • Exclusive Author
EireStudio
says
4948 posts Community Mod Building awesome stuff for your mobile devices!
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
  • Author Level 8
+17 more
Enabled
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
  • 6 Years of Membership
  • Affiliate Level 2
  • Author Level 3
  • Collector Level 1
+2 more
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.

971 posts
  • 6 Years of Membership
  • Author Level 5
  • Collector Level 4
  • Exclusive Author
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:|

4948 posts Community Mod Building awesome stuff for your mobile devices!
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
  • Author Level 8
+17 more
Enabled
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
  • 6 Years of Membership
  • Affiliate Level 2
  • Author Level 3
  • Collector Level 1
+2 more
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.

610 posts Themes and Graphics
  • 6 Years of Membership
  • Affiliate Level 3
  • Author Level 9
  • Beta Tester
+11 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