Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] How to Download data from the Web

Expand Messages
  • Danny Platt
    ... If you expressly want to save the page to a file, the following is ... #!/usr/bin/perl use LWP::Simple;
    Message 1 of 1 , Jul 29, 2000
    • 0 Attachment
      joach@... writes:

      > Last week there was a post on how to use Simple as a Browser
      > replacement.........I am trying to get this script to work...... seems
      > to connect to the site but will not write the file........Could someone
      > have a look maybe something is left out ......
      <snip script>

      If you expressly want to save the page to a file, the following is
      easier/shorter:
      ----
      #!/usr/bin/perl

      use LWP::Simple;
      $status=getstore("http://www.domain.com.page.html","file-to-save-in");
      exit;
      ----

      $status will contain the status code of the transaction (eg '404' for
      file not found, '200' for success etc) so you can check if it worked.

      HTH

      --
      Later, Dan

      Stolichnaya!
    Your message has been successfully submitted and would be delivered to recipients shortly.