[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perl & HTML



Hallo Udo,


> Any hints?
ich denke ja

zum Redirect sagt 'perldoc LWP::UserAgent':

       $ua->redirect_ok($prospective_request)
           This method is called by request() before it tries to
           follow a redirection to the request in $prospec-
           tive_request.  This should return a true value if this
           redirection is permissible.

           The default implementation will return FALSE unless
           the method is in the object's "requests_redirectable"
           list, FALSE if the proposed redirection is to a
           "file://..."  URL, and TRUE otherwise.

           Subclasses might want to override this.

           (This method's behavior in previous versions was sim-
           ply to return TRUE for anything except POST requests).


Wenn du nicht auf den LWP::UserAgent angewiesen bist, würde ich das
aber mit LWP::Simple erledigen.

----------------------------
#!/usr/bin/perl -w

use strict;
require LWP::Simple;

my $i = 1;
my $url = "";

while ($i < 10000000) {
  $url = "http://***/functions.phtml\?IdentNr=$i";;
  if (get $url){
     getstore ($url, "/tmp/download/$i.html");
     print $i . "\n";
  }
  $i++;
}

----------------------------


Probiere es mal aus. 'get' checkt vorerst nur die $url, wenn ok dann
wird gesaugt. Er sollte, wenn die $url nicht existiert mit mit dem
nächsten $i weitermachen.
Ist ungetestet und wird so wahrscheinlich auch nur funktionieren, wenn
der Webserver einen Fehler zurückgibt und anschliessend erst
weiterleitet.


gut's nächtle
Gabriel
--
Die neuesten News? http://www.newsfire.de



Reply to: