foreach ($data as $k){
foreach ($k as $kq => $v){
foreach(($v["photo_list"]) as $key => $url){
$name = (basename($url));
$path = "/" . $name ;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
if(!file_exists($name)){
$file = fopen($path, "w+");
fwrite($file, $data);
fclose($file);
}
}
}
}
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);