The syntax for the curl command is as follows: curl [options] [URL...] In its simplest form, when invoked without any option, curl displays the specified resource to the standard output. The command will print the source code of the example.com homepage in your terminal window.
Using corion.net/curl2lwp.psgi , you can easily convert a Curl command line to a Perl script using LWP::UserAgent. The comment box is too small for the resulting code, but if that's what you're looking for, I can post it as answer.
cURL, which stands for client URL, is a command line tool that developers use to transfer data to and from a server. At the most fundamental, cURL lets you talk to a server by specifying the location (in the form of a URL) and the data you want to send.
I have a very simple task. I have a crontab that will run a script every hour. The script is meant to simply process a URL.
This is what I have. It doesn't work. I get a syntax error.
#!/usr/bin/perl
curl http://domain.com/page.html;
I haven't worked in Perl in years and wasn't very adept when I did.
SOLUTION
Thanks, Alex for pointing me to the correct path!
crontab
*/30 * * * * curl http://domain.com/path.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With