Nerede hata yapıyorum?
Çekilen sitedeki kod dökümü
ta.rentrappot-am@eciffo
Php Bot Kodları
function startBot($site_url , $timeout = 5)
{
$ch = curl_init();
$tarayici = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0';
curl_setopt($ch, CURLOPT_URL,$site_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER , 1);
curl_setopt($ch, CURLOPT_HEADER , 0);
curl_setopt($ch, CURLOPT_TIMEOUT , $timeout);
curl_setopt($ch, CURLOPT_USERAGENT , $tarayici);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
?>
$kaynak = startBot('https://www.wlw.de/en/company/ma-top-partner-1838048?anzeige=firma&q=a');
preg_match_all('@(.*?) @si' , $kaynak , $baslik);
preg_match_all('@@' , $kaynak , $mail);
echo "";
//print_r($baslik[1][0]);
//print_r($mail[0][22]);
print_r($mail[1][22]);
echo "
";
?>