configurationPHP以使用代理?

使用PHP 5.2.6,需要将其configuration为使用我们的转发代理(需要进行身份validation),以便PHP脚本可以正确连接到Internet。

我发现4版本中的PHP.INI有一个pfpro.proxyaddress选项,但是这个选项已经不可用 – 那么replace它是什么?

你可以使用curl来处理你的http检索。

$ch = curl_init("http://whatever.com/something/"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_PROXY, "http://10.14.10.1:3128"); curl_setopt($ch, CURLOPT_PROXYPORT, 3128); curl_setopt ($ch, CURLOPT_PROXYUSERPWD, "user:pass"); 

更多信息在这里