1
$thumbnail_url = 'http://img.youtube.com/vi/JaFfJN_iKdA/default.jpg';
function save_image_local($thumbnail_url)
{
//for save image at local server
$filename = time().'_hk.jpg';
$fullpath = '../../app/webroot/img/daily_videos/image/'.$filename;
$fp = fopen($fullpath,'x');
fwrite($fp, $thumbnail_url);
fclose($fp);
}
在此代碼中,空白圖像store.not原始圖像存儲。如何從本地服務器保存圖像在YouTube或PHP的本地服務器