in reply to Re: getstore protected image
in thread getstore protected image

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.

Replies are listed 'Best First'.
Re^3: getstore protected image
by zentara (Cardinal) on Mar 31, 2006 at 23:01 UTC
    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

        WoW man, you send the url to a super complicated porn site, running php scripts, with tons of javascript popups. I'm not surprised you can't get anything. You will need WWW::Mechanize for that site. You need to collect cookies, fake button presses, and it will probably take you all afternoon to figure it out.

        I'm not interested in working that out, too much work. :-)


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

        It would be polite to mention that the links presented are NSFW!!!!


        ___________
        Eric Hodges