|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
#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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Write a Perl script activated with cron visiting a webpage? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|