Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^5: showing an image downloaded with LWP::Simple

by RobPayne (Chaplain)
on Sep 09, 2006 at 14:33 UTC ( #572150=note: print w/replies, xml ) Need Help??

in reply to Re^4: showing an image downloaded with LWP::Simple
in thread showing an image downloaded with LWP::Simple

You haven't told the browser that there is an image coming. The only MIME type that you have given is "text/html", you need to drop all of the html and tell the browser to expect "image/gif". Take a look at the Downloading a file discussion, where there is discussion of headers similar to what you need to set.
Hint: You should take a look at the headers that you get back when you download the image from, and probably hand them back, or directly link to the noaa image from your existing html, like this:
print STDOUT "<html>\n<head>\n"; print STDOUT "<title></title>\n"; print STDOUT "</head>\n"; print STDOUT "<body>\n"; print STDOUT "<img src=\" +efresh/AL0606W5+gif/144631W_sm.gif\"></img>\n"; print STDOUT "</body>\n"; print STDOUT "</html>\n";
Update: see the responses, above, from Joost and Melly.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://572150]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2016-09-25 21:19 GMT
Find Nodes?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:

    Results (473 votes). Check out past polls.