in reply to getstore protected image

Your question dosn't make sense. If you can get to it with a browser, so it can store it in it's cache, you can read it out of the cache, or save the image. If the browser can get to it, but not lwp, it maybe that the page is using some sort of filter, to filter for browser names. Try to fake out the server:
# setup your browser $ua = LWP::UserAgent->new(keep_alive => 1, timeout => 300); # what kind of browser you are $ua->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/200 +21207 Phoenix/0.5");
If that don't work, there may be some javascript magic going on, and you may need WWW::Mechanize. Try to capture the actual transfer with ethereal or tcpick, to actually see what they are doing.

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: getstore protected image
by Anonymous Monk on Mar 31, 2006 at 22:49 UTC
    Actually what I mean is I can access the page that SHOWS the image in my browser just fine but I cannot type in the URL of the image directly to access the image. It results in a FORBIDDEN error.

    I can load the page that loads the image but I can't load the image directly. What I need is a way to load the image anyway.

      Well it's hard to say, when you don't give the url. Is it a cgi script? A cgi script can deliver a page and image, that is custom made on demand. Not all web pages are static html.

      I'm not really a human, but I play one on earth. flash japh
        Okay, here's a page. This is the page that hosts the image.

        http://imagecash.net/image.php?file=939164675

        Here is the image itself that I cannot access

        http://img19.imagecash.net/files666/939164675.jpg

        (Janitors note: these URLs may not be safe to access from work)

        And this is the script I am working on right now. It takes a URL (as in the first one I posted here) and it scans the image links. Then it follows each of them and gets the image (well, in theory that's what it should be doing.). It can't access the image.

        use warnings; use strict; use LWP::Simple; print "Copy ImageCash URL here: "; my $to_get = <STDIN>; chomp($to_get); my $page = get($to_get); my @images; push(@images, "http://www.imagecash.net/image.php?file=$1") while $pag +e =~m[image.php\?file=(\d+)]g; foreach my $image (@images) { my $num = $image; $num =~ m/(\d+\.jpg)/; $num = $1; my $new_page = get($image); $new_page =~ m#src="(http://img\d+\.imagecash\.net/files666)#; getstore("$new_page/$num.jpg", "$num.jpg"); print "Stored image $num.jpg..\n"; }

        Edit: g0n - Marked URLs potentially NSFW