2009-09-18 6 views

Répondre

0

Utilisez curl pour cela. PHP doit avoir le support de curl et vous avez besoin, évidemment, d'un système de fichiers inscriptible.

+0

Quelque chose ne doit-il pas être modifié dans php.ini? –

1

Est-ce que cela pourrait faire du bon travail?

<?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); 
?> 
Questions connexes