in reply to getstore protected image

Can you clarify what you mean by 'direct access'?

If you're talking about direct access to the URL of the image itself being blocked - as in, blocked in the browser when you're trying to get the image independent of the page - that makes me suspect the server is checking HTTP_REFERER and blocking requests on that criteria. You could use LWP to get a page, build a list of images, and send a new series of GET requests after populating the referer header of the HTTP::Request object with the url of the original page.

HTH.

--
jpg

Replies are listed 'Best First'.
Re^2: getstore protected image
by Anonymous Monk on Mar 31, 2006 at 23:25 UTC
    I mean I can't copy and paste the URL of the image and get it.

    Are you saying I could get the image off the page and toss in a fake HTTP_REFERER while I call another get on the image and it might fake it?

    Any example how to do that?

      I mean:

      - GET the original html page containing img links
      - build an array of URLs for the images
      - for each image URL, use LWP to GET the image. In this step, you'll need to change the referer to the URL of the original page.

      See perldoc LWP and perldoc HTTP::Headers. When you use LWP you create an LWP::UserAgent object, and you can pass an HTTP::Headers object to the LWP::UserAgent's get() method. Populate the HTTP::Headers object with... headers, including 'referer' => $originalURL.

      --
      jpg