就是类似于java中的:
Properties prop = System.getProperties();
prop.setProperty("http.proxyHost", "184.106.215.107");
prop.setProperty("http.proxyPort", "443");
php有这样的设置么?
Properties prop = System.getProperties();
prop.setProperty("http.proxyHost", "184.106.215.107");
prop.setProperty("http.proxyPort", "443");
php有这样的设置么?
$url = 'http://www.baidu.com';
$proxy = 'http://184.106.215.107:443';$process = curl_init($url); // 你的代理
curl_setopt($process, CURLOPT_PROXY, $proxy);curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); $return = curl_exec($process);