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

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

Expand Messages
  • Oliver Manickum
    I am not sure about the proxy part of it.. but i know how to send the userid and password to the server if the site u want to go to requires basic
    Message 1 of 2 , Jul 31 1:46 AM
    • 0 Attachment
      RE: [PBML] How to Download data from the Web

      I am not sure about the proxy part of it.. but i know how to send the userid and password to the server if the site u want to go to requires basic authentication...

      try
      $url = 'http://username:password@targeturl/file.asc';
      works for me :O)

      - Oliver

      -----Original Message-----
      From: Amedeo Avanzato [mailto:Amedeo.Avanzato@...]
      Sent: 31 July 2000 09:37
      To: 'perl-beginner@egroups.com'
      Subject: R: [PBML] How to Download data from the Web


      Hi every one.
      With the script below I can't connect to the site (connetion Time out),
      probably because there is a proxy between me and the site, or the site is
      protected by a password.
      How can I specify the proxy and userid and passwd to enter the site?
      Thanks ...
      Amedeo

      -----Messaggio originale-----
      Da: joach@... [mailto:joach@...]
      Inviato: sabato 29 luglio 2000 22.12
      A: perl-beginner@egroups.com
      Oggetto: [PBML] How to Download data from the Web


      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 ......

      TIA

      John


      #!/usr/bin/perl -w
      # Simple acts as a Browser in perl...
      use LWP::Simple;

      $outfile = 'C:/Mydata/Myfile.asc';
      open(OUT, ">$outfile") || die("Can't open output file $outfile - $!");

      # To get the content of the current site....
      # Define the url
      $url = 'http://target url/file.asc';

      # Get all content from the site..
      my $message = get($url);


      # and print the quote
      print OUT "$message";
      close OUT ;

      # and die..
      exit(0);









      --------------------------------------------------------------------<e|-
      Was the salesman clueless? Productopia has the answers.
      http://click.egroups.com/1/4633/2/_/12898/_/965029010/
      --------------------------------------------------------------------|e>-




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