卷曲与代理不能正常工作

时间:2013-12-02 04:04:45

标签: php parsing curl proxy

我正在使用curl函数来解析来自backpage.com和oodle.com的数据。在backpage.com中,我使用的是代理,但它不能在客户端的服务器上运行,但它完全可以在我们的服务器上运行。但在oodle.com代理不起作用。有没有其他方法可以解析来自oodle.com的数据?我的代码是,

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$urls);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
//curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyauth);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$original_file = curl_exec($ch);
curl_close($ch);

在客户端的服务器中显示错误

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in

我使用phpinfo();检查设置, safe_mod 选项已关闭但 openbase_dir 有值。我该如何解决这个问题?任何人请帮助我。

0 个答案:

没有答案