Fragment kodu:
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "strona/login.php");
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, 'user=*axi*&pass=plackisabe&cookie=on
'); //dane do wyslania
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_HEADER , 1);
curl_setopt($c, CURLOPT_COOKIEFILE, './cookie.txt');
curl_setopt($c, CURLOPT_COOKIEJAR,'./cookie.txt');
curl_setopt($c, CURLOPT_URL, "strona/edit.php");
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, 'f_content='.$_GET['nazwa'].'');
$page = curl_exec($c);
curl_close($c);
echo 'Wynik: <br>' .$page; echo file_get_html
($page)->plaintext;
echo $page wyświetla tak jak należy stronę, a file_get_html zwraca następujący błąd:
Cytat
Warning: file_get_contents() [function.file-get-contents]: open_basedir restriction in effect. File(HTTP/1.1 200 OK Date: Mon, 17 Jun 2013 19:01:07 GMT Server: Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 X-Powered-By: PHP/5.3.25 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8 <html style="overflow:scroll;"> <head> <STYLE type="text/css"> a:link { font-weight:bold; color: #804000; text-decoration:none; } a:visited { font-weight:bold; color: #804000; text-decoration:none; } a:active { font-weight:bold; color: #0082BE; text-decoration:none; } a:hover { font-weight:bold; color: #0082BE; text-decoration:none; } </STYLE> </head> in /public_html/simple_html_dom.php on line 75
Warning: file_get_contents(HTTP/1.1 200 OK Date: Mon, 17 Jun 2013 19:01:07 GMT Server: Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 X-Powered-By: PHP/5.3.25 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8 <html style="overflow:scroll;"> <head> <STYLE type="text/css"> a:link { font-weight:bold; color: #804000; text-decoration:none; } a:visited { font-weight:bold; color: #804000; text-decoration:none; } a:active { font-weight:bold; color: #0082BE; text-decoration:none; } a:hover { font-weight:bold; color: #0082BE; text-decoration:none; } </STYLE> </head> <style type="text/css"> .hidden { display: none; } .unhidden { display: block; } </style in /public_html/simple_html_dom.php on line 75
Co jest grane?

Jak wpiszę sztywny link do tej funkcji - też wszystko śmiga, ale strona ta wymaga autoryzacji, dlatego nie mogę wpisać sztywnego linku.