Download of images without extension

Greetings scrapers,

I ran into an interesting problem trying to download images from a freshly scrape were the images does not have any image extension. A typical image url look like: http://www.thesite.com/Handler/Image.ashx?i=6118

I normally download the images using PHP after a matching and filtering process and not using the session.downloadFile method but any hint on this one are highly welcome.

That link points to a script

That link points to a script that will generate an image for you. Sometime you see links like that, and if you can click it to see the picture, session.downloadFile() will still work. Since this one doesn't work, it requires a valid session, cookie, or POST parameters to generate the image. In any of those cases, you make a scrapeable file to make the page request, and then call scrapeableFile.getContentAsString().