#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    In nederland
    Posts
    41
    Rep Power
    15
    I would like to know how to write a perlscript visiting a website. Not by fetch but as a 'nobody' retrieving the HTML-page (http). For example to check for changes on that page.
    tnxs :0) jochum
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    #grab.pl####################################
    #!/usr/local/bin/perl
    $local_dir = "/tmp/grabbed_data";
    $target_file = "http://hoth.stsci.edu/man/man1/crontab.html";
    use LWP::Simple;
    getstore("$target_file","$local_dir/crontab.html");
    #comment out the following line to run via command line
    print "Content-type: text/htmlnn";
    print "DONE!";
    ############################################
    if Simple.pm not found, get it from http://www.linpro.no/lwp/libwww-perl-5.48.tar.gz
    To run from command line:
    perl /path/to/grab.pl

    Go to the target_file's URL to find out more about crontab.

IMN logo majestic logo threadwatch logo seochat tools logo