Re: Resizing thumbnails to the browser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dan Trainor wrote:
Would the abovementioned use of ForceType also allow one to produce an
image given an HTTP GET query?  I was tinkering around with something in
the past where I wanted to implement something such as:

<img src="http://example.com/myscript.php?site=1&image=2&something=3";>

Would what you suggest force the server to return an image for that
given URL, so that the img src specification listed above will work?


From myscript.php in the above example, just return a Content-Type header and output the image data. Example:

header('Content-Type: image/jpeg');
imagejpeg($my_gd_image);

Jasper

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux