2014-01-22 3 views

답변

1

먼저 다운로드 : 필요에 따라

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, "URL HERE"); 
curl_setopt($ch, CURLOPT_HEADER, 0); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($ch); 

curl_close($ch); 

그런 다음 데이터를 처리합니다. 그 후 :

header("Content-Disposition: attachment; filename=\"" . basename($File) . "\""); 
header("Content-Type: application/force-download"); 
header("Content-Length: " . filesize($File)); 
header("Connection: close"); 
+0

이것은 잘못된 것입니다. 제 3 자 웹 사이트에서 파일을 다운로드해야하며 자신의 웹 사이트에서 파일을 다운로드하지 않아야합니다. –

+0

+1 - downvote를 제거 할 수 있도록 게시물을 가볍게 편집했습니다. 이제 대답은 정확합니다. –

+0

감사합니다. – KBeckers