View Single Post
Old Mar 16th, 2007, 4:50 PM   #8
woozy
Newbie
 
Join Date: Mar 2007
Posts: 15
Rep Power: 0 woozy is on a distinguished road
A temp solution

Okay, this works (mostly)

<h1>HI THERE</h1>
<?php
$image = fread(........);

$file = tempnam("/dir/", "TEMP");
$handle = fopen($file, "w");
fwrite($handle, $image);
fclose($handle);
?><img src="<?= $file ?>" ><?php
In essence it makes a file of the image and the img tag references. The drawback is that although $file is meant to be temporary it will exist on the server untill deleted by unlink.

I don't know how to put off calling unlink untill after the page has loaded.

Anyone know?

Still this is a *huge* improvement!
woozy is offline   Reply With Quote