Posted by Scott Wilcox
Sunday December 17th, 2006
PHP
// Script to fetch zip files from the tmbo.org site and store
// them locally at a set path. This local path is set here:
$path = "/path/to/local";
// URL to ZIP repository
$url = "http://zips.thismight.be/zips/";
// Day, minus one.
$day = date("d")-1;
// Actual filename (A day behind)
$file = date("Y_m")."_$day.zip";
echo "Transfer: ".$url.$file." --> ".$path.$file."n";
if (copy($url.$file,$path.$file)) {
echo "Successfully copied ZIP '$file'n";
} else {
echo "Unable to copy ZIP '$file'n";
}
?>
No users have commented on this post yet.