in reply to Save PHP-generated image with Win32 IE Mechanize

Most likely, you (or your browser) are sending the wrong HTTP headers when retrieving the image. Use a tool like Wireshark to inspect the network traffic and then replicate that traffic from within Perl.

If you're not tied to Internet Explorer, I find my module WWW::Mechanize::Firefox to be more accessible, because Firefox has the Live HTTP Headers that allow easier inspection.

  • Comment on Re: Save PHP-generated image with Win32 IE Mechanize

Replies are listed 'Best First'.
Re^2: Save PHP-generated image with Win32 IE Mechanize
by casimo (Sexton) on Feb 11, 2010 at 03:17 UTC
    Thanks Corion

    I added some request headers and checked what was happening in Wireshark - it looks like Win32 IE Mechanize is simply ignore the request headers.

    When I do the same thing with WWW Mechanize it sends the proper headers and save the actual image.