il_kodu array 500 501 502 503 504 505 506 507 508 10 509 11 510 12 511

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$il_kodu = array(1 => '500', 2 => '501', 3 => '502', 4 => '503', 5 => '504', 6 => '505', 7 => '506', 8 => '507', 9 => '508', 10 => '509', 11 => '510', 12 => '511', 13 => '512', 14 => '513', 15 => '514', 16 => '515', 17 => '516', 18 => '517', 19 => '518', 20 => '519', 21 => '520', 22 => '521', 23 => '522', 24 => '523', 25 => '524', 26 => '525', 27 => '526', 28 => '527', 29 => '528', 30 => '529', 31 => '530', 32 => '531', 33 => '532', 34 => '533', 35 => '534', 36 => '535', 37 => '536', 38 => '537', 39 => '538', 40 => '539', 41 => '540', 42 => '541', 43 => '542', 44 => '543', 45 => '544', 46 => '545', 47 => '546', 48 => '547', 49 => '548', 50 => '549', 51 => '550', 52 => '551', 53 => '552', 54 => '553', 55 => '554', 56 => '555', 57 => '556', 58 => '557', 59 => '558', 60 => '559', 61 => '560', 62 => '561', 63 => '562', 64 => '563', 65 => '564', 66 => '565', 67 => '566', 68 => '567', 69 => '568', 70 => '569', 71 => '570', 72 => '571', 73 => '572', 74 => '573', 75 => '574', 76 => '575', 77 => '576', 78 => '577', 79 => '578', 80 => '579', 81 => '580');
$ilce_kodu = array(1 => '9146', 2 => '9158', 3 => '9167', 4 => '9185', 5 => '9193', 6 => '9198', 7 => '9206', 8 => '9225', 9 => '9238', 10 => '9246', 11 => '9252', 12 => '9270', 13 => '9285', 14 => '9288', 15 => '9295', 16 => '9297', 17 => '9303', 18 => '9311', 19 => '9315', 20 => '9327', 21 => '9335', 22 => '9352', 23 => '9359', 24 => '9370', 25 => '9392', 26 => '9402', 27 => '9414', 28 => '9419', 29 => '9432', 30 => '9440', 31 => '9451', 32 => '9470', 33 => '9479', 34 => '9494', 35 => '9501', 36 => '9507', 37 => '9515', 38 => '9522', 39 => '9528', 40 => '9541', 41 => '9560', 42 => '9577', 43 => '9581', 44 => '9587', 45 => '9594', 46 => '9609', 47 => '9620', 48 => '9635', 49 => '9638', 50 => '9646', 51 => '9629', 52 => '9654', 53 => '9676', 54 => '9689', 55 => '9703', 56 => '9716', 57 => '9726', 58 => '9737', 59 => '9747', 60 => '9755', 61 => '9760', 62 => '9766', 63 => '9782', 64 => '9788', 65 => '9799', 66 => '9807', 67 => '9819', 68 => '9839', 69 => '9847', 70 => '9868', 71 => '9831', 72 => '9854', 73 => '9879', 74 => '9887', 75 => '9905', 76 => '9914', 77 => '9919', 78 => '9930', 79 => '9935', 80 => '9949', 81 => '9955');
$il_adi = array(1 => 'Adana', 2 => 'Adıyaman', 3 => 'Afyon', 4 => 'Ağrı', 5 => 'Aksaray', 6 => 'Amasya', 7 => 'Ankara', 8 => 'Antalya', 9 => 'Ardahan', 10 => 'Artvin', 11 => 'Aydın', 12 => 'Balıkesir', 13 => 'Bartın', 14 => 'Batman', 15 => 'Bayburt', 16 => 'Bilecik', 17 => 'Bingöl', 18 => 'Bitlis', 19 => 'Bolu', 20 => 'Burdur', 21 => 'Bursa', 22 => 'Çanakkale', 23 => 'Çankırı', 24 => 'Çorum', 25 => 'Denizli', 26 => 'Diyarbakır', 27 => 'Düzce', 28 => 'Edirne', 29 => 'Elazığ', 30 => 'Erzincan', 31 => 'Erzurum', 32 => 'Eskişehir', 33 => 'Gaziantep', 34 => 'Giresun', 35 => 'Gümüşhane', 36 => 'Hakkari', 37 => 'Hatay', 38 => 'Iğdır', 39 => 'Isparta', 40 => 'İstanbul', 41 => 'İzmir', 42 => 'Kahramanmaraş', 43 => 'Karabük', 44 => 'Karaman', 45 => 'Kars', 46 => 'Kastamonu', 47 => 'Kayseri', 48 => 'Kırıkkale', 49 => 'Kırklareli', 50 => 'Kırşehir', 51 => 'Kilis', 52 => 'Kocaeli', 53 => 'Konya', 54 => 'Kütahya', 55 => 'Malatya', 56 => 'Manisa', 57 => 'Mardin', 58 => 'Mersin', 59 => 'Muğla', 60 => 'Muş', 61 => 'Nevşehir', 62 => 'Niğde', 63 => 'Ordu', 64 => 'Osmaniye', 65 => 'Rize', 66 => 'Sakarya', 67 => 'Samsun', 68 => 'Siirt', 69 => 'Sinop', 70 => 'Sivas', 71 => 'Şanlıurfa', 72 => 'Şırnak', 73 => 'Tekirdağ', 74 => 'Tokat', 75 => 'Trabzon', 76 => 'Tunceli', 77 => 'Uşak', 78 => 'Van', 79 => 'Yalova', 80 => 'Yozgat', 81 => 'Zonguldak');
$toplam_il = count($il_kodu);
$toplam = $toplam_il +1;
for($i=1; $i < $toplam; $i++)
{
EzanVakitleri($i, $il_kodu[$i], $ilce_kodu[$i], $il_adi[$i]);
}
function EzanVakitleri($id, $il_kodu, $ilce_kodu, $il_adi)
{
$open = file_get_contents("http://ahmeti-namaz-vakitleri.appspot.com/index.php?islem=getNamazVakitleri&ulke_id=2&sehir_id={$il_kodu}&ilce_id={$ilce_kodu}");
$json = json_decode($open);
$Tarih = $json[0]->Tarih;
$imsak = $json[0]->Imsak;
$gunes = $json[0]->Gunes;
$ogle = $json[0]->Ogle;
$ikindi = $json[0]->Ikindi;
$aksam = $json[0]->Aksam;
$yatsi = $json[0]->Yatsi;
$kible = $json[0]->Kible;
$guncelle = @mysql_query("UPDATE ezan_vekitleri_v1 SET tarih ='{$Tarih}', sehir ='{$il_adi}', imsak ='{$imsak}', gunes ='{$gunes}', ogle ='{$ogle}', ikindi ='{$ikindi}', aksam ='{$aksam}', yatsi ='{$yatsi}', kible ='{$kible}' WHERE id = '{$id}' ");
}