3432 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 more
KrownThemes says

So i have an image object in the php file. How can i make that box appear and let the users save the image in their computer?

I am currently using imagejpeg($img, ””, 100);, which shows the picture and the the user can save it. But i want open that save box auto .. can it be done?

1389 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Grew a moustache for the Envato Movember competition
  • Has been a member for 6-7 years
  • Referred between 10 and 49 users
+3 more
Pdesignx says

header("Content-Type: image/jpg");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("content-disposition: attachment; filename=my_image.jpg");

imagejpeg($img, null, 100);

3432 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 more
KrownThemes says

thanks! :)

by
by
by
by
by
by