Your forum posting technique could use a little work:
1) Use code formatting tags rather than just pasting your code in the page
2) Describe your problem better.
So you tried this code:
$path = './proxies.txt';
$proxies = array();
foreach(file($path, FILE_SKIP_EMPTY_LINES) as $line) {
$proxy = trim($line);
list($ip, $port) = explode(':', $proxy);
$proxies[$ip] = $port;
}
var_dump($proxies);
and then get proxies from array and randomising them using
curl_setopt($ch, CURLOPT_PROXY,$proxies[array_rand($proxies)]);
You could start be describing what it does right, what it does wrong, and what else you want it to do.