php resim inditme
3
●409
- 25-01-2013, 16:22:12Üyeliği durduruldumerhabalar php ile butona tıklandığında resmi indirtmek istiyorum fakat bir türlü yapmadım yardımcı olurmusunuz acaba?
- 28-01-2013, 21:32:19
$rand =substr(md5(uniqid(rand())),0,30); $dosya_adi = $rand.".jpg"; $chi = curl_init("http://www.siteadresi.com/image.jpg"); $fpi = fopen("files/$dosya_adi", "w"); curl_setopt($chi, CURLOPT_REFERER, "http://www.siteadresi.com"); curl_setopt($chi, CURLOPT_FILE, $fpi); curl_setopt($chi, CURLOPT_HEADER, 0); curl_exec($chi); curl_close($chi); fclose($fpi);