3804 posts
  • Copyright Ninja
  • Power Elite Author
  • Author Level 12
  • Trendsetter
+13 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
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 5
  • Beta Tester
+9 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);

3804 posts
  • Copyright Ninja
  • Power Elite Author
  • Author Level 12
  • Trendsetter
+13 more
KrownThemes
says

thanks! :)

by
by
by
by
by
by