> > > <img src="image.php?image=1"> > > > > > > The code is like this: > > > > > > <script language="php"> > > > $szPicture = "myimage.gif"; > > > > > > $url = "http://www.mysite.com/" . $szPicture; > > > header("Content-type: image/gif"); > > > header("Content-Length: " . strlen($url)); > > > echo $url; > > > </script>
You're properly printing out the Content-type header, but not the actual image data. You need to get the get the binary data (probably using a binary-safe read) from the image file you want to display (in $url), and then print that data out after the content-type header. Right now, a browser would get sent a content-type header for a gif, and then the following string: http://www.mysite.com/myimage.gif and that's not valid contents for a .gif file. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]