Konu sahibinin izniyle normal php sitesinde kullanmak için birkaç değişiklik yaptım aşağıdaki kodlarla sitenizde sorunsuz kullanabilirsiniz. <html>
<head>
<title>İl ilçe</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
</head>
<body>
<form action="" method="post">
<div class="container">
<div class="row">
<div class="col-md-12"><h1>Nöbetçi Eczaneler</h1></div>
<div class="col-md-3">
<select name="il" id="il" class="form-control">
<option value="">Seçin...</option>
</select>
</div>
<div class="col-md-3">
<select name="ilce" id="ilce" class="form-control" disabled="disabled">
<option value="">Seçin...</option>
</select>
</div>
<div>
<button type="submit" class="btn btn-succes">Gönder</button>
</div>
<?php
$bulil=@$_POST['il'];
$bulunacakil = array('A','B','C','Ç','D','E','F','G','Ğ','H','I','İ','J','K','L','M','N','O','Ö','P','R','S','Ş','T','U','Ü','V','Y','Z');
$degistiril = array('a','b','c','c','d','e','f','g','g','h','i','i','j','k','l','m','n','o','o','p','r','s','s','t','u','u','v','y','z');
$sonucil=str_replace($bulunacakil, $degistiril, $bulil);
$il = $sonucil;
$bulilce=@$_POST['ilce'];
$bulunacakilce = array('A','B','C','Ç','D','E','F','G','Ğ','H','I','İ','J','K','L','M','N','O','Ö','P','R','S','Ş','T','U','Ü','V','Y','Z');
$degistirilce = array('a','b','c','c','d','e','f','g','g','h','i','i','j','k','l','m','n','o','o','p','r','s','s','t','u','u','v','y','z');
$sonucilce=str_replace($bulunacakilce, $degistirilce, $bulilce);
$ilce = $sonucilce;
if(@$_POST["ilce"]==""){}
else{
$site = "https://www.mynet.com/".$il."/".$ilce."-nobetci-eczaneler";
$bolme = ('@<div class="col-7">.*?</div>@si');
$bolme2 = ('@<p><strong>Adres:</strong>.*?</p>@si');
$bolme3 = ('@<p><strong>Telefon:</strong>.*?</p>@si');
$arama = file_get_contents($site);
preg_match_all($bolme,$arama,$siir);
preg_match_all($bolme2,$arama,$baslik);
preg_match_all($bolme3,$arama,$yazar);
?>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Eczane Adı</th>
<th scope="col">Adres</th>
<th scope="col">Telefon</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td> <?php echo $siir[0][0]; ?></td>
<td><?php echo $baslik[0][0] ?></td>
<td><?php echo $yazar[0][0] ?> </td>
</tr>
</tbody>
</table>
<?php
}
?>
</div>
</div>
</form>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script>
$.getJSON("il-bolge.json", function(sonuc){
$.each(sonuc, function(index, value){
var row="";
row +='<option value="'+value.il+'">'+value.il+'</option>';
$("#il").append(row);
})
});
$("#il").on("change", function(){
var il=$(this).val();
$("#ilce").attr("disabled", false).html("<option value=''>Seçin..</option>");
$.getJSON("il-ilce.json", function(sonuc){
$.each(sonuc, function(index, value){
var row="";
if(value.il==il)
{
row +='<option value="'+value.ilce+'">'+value.ilce+'</option>';
$("#ilce").append(row);
}
});
});
});
</script>
</body>
</html>[CENTER][IMG]https://cdn.r10.net/editor/111249/3086232677.png[/IMG][/CENTER]Dosya indirme linki
https://www.dosya.tc/server34/9qyi8f/eczane.zip.html