09-25-2007, 10:49 AM
|
#4 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Not sure what you're trying to do but how about something like this:
PHP Code:
<?php function file_get_contents_proxy($szURL, $szProxy, $iProxyPort = 8080) { $pCurl = curl_init($szURL); curl_setopt($pCurl, CURLOPT_PROXY, $szProxy); curl_setopt($pCurl, CURLOPT_PROXYPORT, 8080); curl_setopt($pCurl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($pCurl, CURLOPT_RETURNTRANSFER, true); return curl_exec($pCurl); } $aServers = array ( array ( 'ServerAddr' => 'http://www.deli.icio.us/1/', 'ProxyAddr' => '192.17.239.250', 'ProxyPort' => 3127, ), array ( 'ServerAddr' => 'http://www.deli.icio.us//2/', 'ProxyAddr' => '192.168.0.1:8080', 'ProxyPort' => 8080, ) ); for($iIndex = 0; $iIndex < count($aServers); $iIndex++) { file_get_contents_proxy($aServers[$iIndex]['ServerAddr'], $aServers[$iIndex]['ProxyAddr'], $aServers[$iIndex]['ProxyPort']); }
?>
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|