• 25-01-2013, 16:22:12
    #1
    Üyeliği durduruldu
    merhabalar php ile butona tıklandığında resmi indirtmek istiyorum fakat bir türlü yapmadım yardımcı olurmusunuz acaba?
  • 28-01-2013, 17:55:25
    #2
    file_get_contents ve file fonksiyonlarını araştır
  • 28-01-2013, 20:19:55
    #3
    header("Content-Disposition: attachment; filename=resim.jpg");    
    header("Content-Type: application/force-download");
    header("Content-Type: application/octet-stream");
    header("Content-Type: application/download");
    header("Content-Description: File Transfer");
  • 28-01-2013, 21:32:19
    #4
    $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);