I have a script called urlretrieve.php
that I have placed on my web server. Lets say the web address is www.example.com/urlretrieve.php
and when you visit this website, a file from an ftp site is downloaded called download.zip
and placed into the same folder as urlretrieve.php
on the web server. I need this website to be visited (executed) once a week so that the ftp file downloads once a week. My question is, what should my cron job command be? At the moment I am using
0 14 * * 3 wget http://www.example.com/urlretrieve.php
and it isn't working. I have tested many others, but no luck.
I am using CPANEL.
Edit: This is the urlretrieve.php script
<?php
$url = "ftp://alt.ncsbe.gov/data/ncvhis1.zip";
$fh = fopen(basename($url), "wb");
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FILE, $fh);
curl_exec($ch);
curl_close($ch);
?>