Also hab das mit dem Fehler jetzt malweggelassen und erstmal versucht dem Link zu folgen und zwar so:
$curl_link = 'http://ul.to/fnum1u';
$useragent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7';
$timeout = 20;
function geturl(){
global $curl_link,$useragent,$timeout;
$ch = curl_init($curl_link);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
echo geturl();
Antwort:
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /var/www/web49/html/diamonddog/downloads/test.php on line 12
HTTP/1.1 302 Found
Date: Mon, 18 Jan 2010 10:50:57 GMT
Server: Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2
Location: http://uploaded.to/file/fnum1u
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
<p>The document has moved <a href="http://uploaded.to/file/fnum1u">here</a></p>
PS: save_mode ist off