function check_proxy($proxy) {
if (empty($proxy))
return FALSE;
$proxy = trim($proxy);
$post = "data=34fwew4fseg4egw4w4g";
$ch = curl_init("http://домен.ру/check.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
$data = curl_exec($ch);
curl_close($ch);
if ($data == "34fwew4fseg4egw4w4g") {
return TRUE;
} else {
return FALSE;
}
}