in reply to LWP Simple - getstore function

I use the GetStore command to pull pictures of the web and save them.

All I use is

use LWP::Simple; getstore("http://path.to.web/image.jpg","/path/to/myimage.jpg");

Works like a treat on Images and Text/HTML files. getstore seems to work out the file handle's and bin mode its self.

Al

Replies are listed 'Best First'.
Re^2: LWP Simple - getstore function
by tanger (Scribe) on Oct 31, 2004 at 16:57 UTC
    Hi

    ahhhhh! it was the server that had it all along. I just woke up today mourning with a fresher focus and relized i should replace my url string with any other test url. It worked so I narrowed the problem down to be that the image I was trying to retrieve before was off a server that has some sort of image redirection/protection?? I ended up getting the image from the place I wanted too but I had too add the full url I got from parsing

    ex. www.path.to.web/image.jpg?qlt=75&wid=175&cvt=jpg

    Instead I took that url and parsed it so I didn't have the extra parameters being passed. I figured that was the right way to retrieve that actual image file and OH BOY was I WRONG!!!! That cost me about a 2 hr headache sitting at the comp researching last night :((((.

    I guess last night I wasn't quick enough to try to narrow in on that problem, maybe being because I read so many getstore examples and how they just worked fine. I'm on a machine I just got on so In the back of my head I was hoping it was a server setting/module version or something that didn't make getstore working properly.

    thank you all for trying to help me

    Your advice and tips gained me knowledge on this topic and helped me figure this out. I'll be sure not to run into this type of problem again.

    tanger