Let me say here at the start I am not a programmer, just interested..
I am trying to load a file to youtube on the first day of the month and set the file name as the lastmonth-thisyear.avi like March-2012.avi
I have tried this but get an error:
File to be uploaded at /Jpeg2/movies/"$THISMONTH"-"$THISYEAR".avi does not exist or is not readable.Done!
It does not read in the variables.
$THISDAY=date("d");
$THISMONTH=date("F");
$THISYEAR=date("Y");
$LASTMONTH = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
$LASTYEAR = mktime(0, 0, 0, date("m"), date("d"), date("Y")-1);
// this I hope makes the file December-2012
if ($THISDAY="01") {
$THISMONTH=$LASTMONTH;
$THISYEAR=$LASTYEAR;
}
$filesource = $yt->newMediaFileSource('/var/www/localhost/htdocs/Jpeg2/movies/"$THISMONTH"-"$THISYEAR").avi');
$filesource->setContentType('video/avi');
// set slug header
$filesource->setSlug('"$THISMONTH"-"$THISYEAR".avi');
Cheers