Code: Select all
$username = 'username';
$password = 'password';
$url = 'http://identi.ca/api/statuses/update.xml';
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 2);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status= $s0 $awesome");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
Code: Select all
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0);
curl_setopt($ch, CURLOPT_PROXY, '128.114.63.15:3128');
I'm not really sure where, or how to implement this into my code. Any help would be greatly appreciated.
Second question, how do I use an array for the proxy value (ie: use more than one proxy, which is randomly chosen when the script is executed)?
Thanks again guys!