Hi I have the following problem,
I want to laod a website with php. I used CURL, but on my server I have open_basedir set.
So, I get the following error message:
CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in
Code is:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$store = curl_exec ($ch);
$error = curl_error ($ch);
return $store;
Is there an alternative way to load a website using php ?!
Thanks
You can try to get the content of the website using
file_get_contents():