error_reporting(0);
function Baglan($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$cikti = curl_exec($curl);
curl_close($curl);
return str_replace(array("\n","\t","\r"), null,$cikti);
}
$baglan = Baglan ('https://nobet.org');
//echo $baglan;
preg_match('@(.*?)
@si',$baglan ,$kategoriler);
preg_match_all('@(.*?) @si',$kategoriler[1] , $kategori);
//preg_match('@(.*?)
@si',$baglan ,$baslik);
//print_r($kategori);
$kategorilink =$kategori[1];
$kategoribaslik =$kategori[3];
// ### İL Git ### //
if ( $il = $_GET["il"])
{
$link ="https://nobet.org/{$il}/nobetci-eczaneler.html";
$kategoribaglan = Baglan ($link);
//echo $kategoribaglan;
}
?>
if ( $il = $_GET["il"])
{
### ECZANELERİ ALALIM ###
preg_match_all('@(.*?)
@si',$kategoribaglan ,$eczane4);
preg_match_all('@(.*?)@si',$kategoribaglan ,$eczane5);
preg_match_all('@(.*?) preg_match_all('@(.*?) preg_match_all('@(.*?) @si',$kategoribaglan ,$eczane9);
//print_r($eczane5);
$baslik1 = $eczane4[1];
$eczaneadi = $eczane5[1];
$ilceadi = $eczane7[6];
$telefon = $eczane8[2];
$adres = $eczane9[1];
for( $i = 0; $i echo $baslik1[$i];
echo "
";
echo $eczaneadi[$i];
echo "
";
echo "$ilceadi[$i]";
echo "
";
echo $telefon[$i];
echo "
";
echo $adres[$i];
}
}
?>