You are here: Anyone know how to create automatic download using CURL and creating a new folder every day??? « PHP Programming Language « IT news, forums, messages
Anyone know how to create automatic download using CURL and creating a new folder every day???

Posted by TechieGrl on 08/07/07 20:26

I want to save a zip file daily. The file is named the same thing
each day so I would like to create a folder and name it with today's
date and then save the zip file into that folder.

I'm using this code and can't seem to figure out how to create the new
folder and save the file there.
Any help is appreciated!

$todays_date = date("Ymd");

$fp = fopen (dirname(__FILE__) . '/file.zip', 'w+');//This is the file
where we save the information
$ch = curl_init('http://www.downloadhere.com/file.zip');//Here is the
file we are downloading
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp);

So each day I should have something like 20070807\file.zip.

Any help on how to do this would be greatly appreciated.


THANKS!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация