function grab_image($url,$saveto){
$ch = curl_init ($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
$raw=curl_exec($ch);
curl_close ($ch);
if(file_exists($saveto)){
unlink($saveto);
}
$fp = fopen($saveto,'x');
fwrite($fp, $raw);
fclose($fp);
}
grab_image('https://instagram.fada1-8.fna.fbcdn.net/v/t51.2885-19/s320x320/59381178_2348911458724961_5863612957363011584_n.jpg?_nc_ht=instagram.fada1-8.fna.fbcdn.net&_nc_ohc=O_2E-RAl6mQAX__dp_C&oh=060106f8edf99d36efb1dc36dc737636&oe=5EC8605B', 'indir.jpg');
bu curl işlemi ile sunucuya mı indirliyor yoksa site üzerinden butona tıklayan kullanıcı mı @Abdullahx