note 100577 added to function.imagepng
| From: | mhorne69 at gmail dot com | Date: | Mon, 25 Oct 2010 02:02:42 +0000 |
| Subject: | note 100577 added to function.imagepng | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173422@lists.php.net to get a copy of this message | ||
If you're generating an image dynamically based on post data and don't want to save it to
the server, sending it to be displayed can cause problems as when the person tries to save it, the
browser will request it again from the server (causing any post data to be lost and probably a
corrupted png).
The easiest way to get around this is to force it to download using the content disposition header,
for example:
header('Content-Disposition: Attachment;filename=image.png');
header('Content-type: image/png');
----
Server IP: 69.147.83.197
Probable Submitter: 81.132.0.93
----
Manual Page -- http://www.php.net/manual/en/function.imagepng.php
Edit -- https://master.php.net/note/edit/100577
Del: integrated -- https://master.php.net/note/delete/100577/integrated
Del: useless -- https://master.php.net/note/delete/100577/useless
Del: bad code -- https://master.php.net/note/delete/100577/bad+code
Del: spam -- https://master.php.net/note/delete/100577/spam
Del: non-english -- https://master.php.net/note/delete/100577/non-english
Del: in docs -- https://master.php.net/note/delete/100577/in+docs
Del: other reasons-- https://master.php.net/note/delete/100577
Reject -- https://master.php.net/note/reject/100577
Search -- https://master.php.net/manage/user-notes.php