function vericek($ursa){
$proxy = "77.94.48.4:80";
$proxy = explode(':', $proxy);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $ursa);
curl_setopt($curl, CURLOPT_USERAGENT, 'Twitterbot/1.0');
curl_setopt($curl, CURLOPT_PROXY, $proxy[0]);
curl_setopt($curl, CURLOPT_PROXYPORT, $proxy[1]);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_REFERER, 'medyax.com');
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
Benim eski haber sitelerimde kullandığım siteye bağlanma kodudur. Bu şekilde çalışan bir proxy ip bulursan 111.11.11.11:8080 gibi girersen eğer o otomatik ip ve port'u ayıracaktır. Bu sayede farklı ip ile veri çekmiş olacaksın.