2009-09-18 5 views

답변

0

curl을 사용하십시오. PHP는 컬을 지원해야하며, 분명히 쓰기 가능한 파일 시스템이 필요합니다.

+0

php.ini에서 뭔가를 변경해야합니까? –

1

이 작업은 효과가 있습니까?

<?php 
ini_set(max_execution_time, 0); 

$the_link = $_GET['url']; 

$ch = curl_init($the_link); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322;)"); 
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt'); 
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt'); 
$the_file = curl_exec($ch); 
curl_close($ch); 

$hdl = fopen("file", 'w'); 
fwrite($hdl, $the_file); 
fclose($hdl); 
?> 
관련 문제