PHP ile haritalı hava durumu

OGUZHANPW

Onlar ABC'yi öğrettiler ama DEF'yi biz öğrendik.
Mesajlar
42
En iyi cevaplar
0
Beğeniler
20
Puanları
0


Türkiye Meteoroloji Genel Müdürlüğü tarafından gerçekleştirilen hava durumunu kendi sitenizde göstermek veya düzenleyip koyabilirsiniz. Vermiş olduğum kod içerisinde harita üzerinden il seçimi yapabilirsiniz. Herhangi bir hata bulunmamaktadır.
HTML:
<style>
th,td {
    padding-left: 50px;
    text-align: center;
    padding-bottom: 20px;
}
</style>
<center>
    <br>
    <p>Lütfen haritadan bir il seçiniz.</p>
    <br>
    <div>
        <img src="https://www.mgm.gov.tr/FILES/img_harita/turkiye_a_520.gif" alt="" ismap="ismap" usemap="#turkiyeMap" style="width: 520px; height: 250px;">
    </div>
    <map id="turkiyeMap" name="turkiyeMap">
        <area href="?il=ADANA" title="ADANA" shape="poly" alt="" coords="258, 200, 247, 194, 253, 190, 242, 171, 253, 157, 265, 157, 265, 150, 283, 136, 283, 158, 278, 158, 271, 176, 277, 177, 276, 185">
        <area href="?il=ADIYAMAN" title="ADIYAMAN" shape="poly" alt="" coords="335, 166, 315, 160, 318, 151, 334, 145, 339, 139, 352, 143, 361, 139, 355, 153">
        <area href="?il=AFYONKARAHISAR" title="AFYONKARAHİSAR" shape="poly" alt="" coords="113, 155, 107, 154, 104, 148, 114, 141, 107, 131, 125, 106, 139, 109, 147, 105, 158, 112, 156, 125, 148, 135, 143, 131, 124, 143">
        <area href="?il=AGRI" title="AĞRI" shape="poly" alt="" coords="462, 92, 464, 96, 456, 104, 445, 88, 446, 84, 440, 75, 464, 67, 471, 73, 489, 75, 500, 70, 498, 83, 489, 86, 482, 89, 479, 94, 472, 88">
        <area href="?il=AKSARAY" title="AKSARAY" shape="poly" alt="" coords="222, 149, 206, 151, 199, 141, 203, 131, 208, 134, 213, 127, 218, 114, 232, 136">
        <area href="?il=AMASYA" title="AMASYA" shape="poly" alt="" coords="268, 63, 257, 71, 260, 63, 253, 57, 248, 56, 250, 44, 270, 51, 279, 47, 284, 53, 283, 59">
        <area href="?il=ANKARA" title="ANKARA" shape="poly" alt="" coords="200, 94, 208, 106, 202, 114, 194, 107, 181, 116, 169, 115, 165, 109, 169, 105, 165, 88, 157, 80, 139, 76, 146, 69, 160, 71, 182, 56, 199, 68, 204, 66, 212, 71, 210, 80, 203, 82">
        <area href="?il=ANTALYA" title="ANTALYA" shape="poly" alt="" coords="181, 217, 174, 211, 167, 200, 131, 186, 121, 210, 118, 207, 102, 211, 90, 203, 102, 191, 106, 178, 118, 172, 134, 175, 136, 170, 147, 170, 158, 171, 178, 190">
        <area href="?il=ARDAHAN" title="ARDAHAN" shape="poly" alt="" coords="451, 40, 451, 46, 444, 46, 436, 40, 441, 27, 440, 21, 445, 16, 462, 29">
        <area href="?il=ARTVIN" title="ARTVİN" shape="poly" alt="" coords="423, 48, 416, 50, 413, 53, 412, 48, 407, 44, 413, 35, 408, 28, 414, 20, 423, 23, 440, 20, 440, 28, 436, 39, 427, 39">
        <area href="?il=AYDIN" title="AYDIN" shape="poly" alt="" coords="51, 163, 44, 159, 38, 165, 35, 166, 35, 157, 29, 153, 37, 151, 41, 144, 71, 142, 76, 143, 81, 156, 74, 164, 67, 160">
        <area href="?il=BALIKESIR" title="BALIKESİR" shape="poly" alt="" coords="78, 106, 67, 109, 61, 99, 47, 96, 36, 97, 29, 102, 24, 99, 36, 89, 26, 89, 35, 81, 47, 82, 50, 71, 52, 64, 54, 53, 71, 63, 67, 66, 68, 76, 88, 93">
        <area href="?il=BARTIN" title="BARTIN" shape="poly" alt="" coords="191, 28, 177, 35, 172, 26, 189, 16">
        <area href="?il=BATMAN" title="BATMAN" shape="poly" alt="" coords="422, 143, 434, 151, 424, 157, 417, 157, 412, 152, 415, 138, 413, 131, 420, 122, 423, 122, 429, 133">
        <area href="?il=BAYBURT" title="BAYBURT" shape="poly" alt="" coords="397, 68, 390, 74, 378, 74, 372, 80, 368, 76, 374, 69, 376, 57, 391, 57">
        <area href="?il=BILECIK" title="BİLECİK" shape="poly" alt="" coords="131, 75, 124, 85, 119, 85, 116, 89, 109, 87, 110, 75, 110, 66, 115, 61, 128, 66">
        <area href="?il=BINGOL" title="BİNGÖL" shape="poly" alt="" coords="411, 119, 403, 124, 395, 122, 391, 127, 385, 122, 392, 117, 389, 111, 388, 102, 379, 108, 380, 100, 394, 90, 399, 94, 410, 92, 413, 101, 418, 103, 413, 107">
        <area href="?il=BITLIS" title="BİTLİS" shape="poly" alt="" coords="455, 123, 458, 141, 455, 143, 443, 133, 437, 135, 431, 133, 425, 121, 435, 118, 435, 114, 443, 108, 456, 104, 463, 106">
        <area href="?il=BOLU" title="BOLU" shape="poly" alt="" coords="182, 56, 163, 69, 148, 69, 141, 76, 134, 75, 129, 67, 141, 57, 152, 57, 164, 45, 174, 45">
        <area href="?il=BURDUR" title="BURDUR" shape="poly" alt="" coords="104, 184, 99, 182, 96, 185, 94, 181, 101, 167, 100, 161, 110, 154, 115, 155, 116, 159, 121, 154, 137, 171, 134, 174, 121, 172, 108, 177">
        <area href="?il=BURSA" title="BURSA" shape="poly" alt="" coords="107, 84, 102, 81, 91, 91, 69, 76, 69, 67, 74, 63, 92, 64, 116, 60, 111, 66">
        <area href="?il=CANAKKALE" title="ÇANAKKALE" shape="poly" alt="" coords="52, 66, 48, 81, 38, 82, 28, 89, 12, 89, 14, 81, 5, 67, 37, 49, 37, 59">
        <area href="?il=CANKIRI" title="ÇANKIRI" shape="poly" alt="" coords="220, 73, 214, 71, 206, 66, 201, 68, 182, 54, 196, 46, 204, 47, 213, 45, 213, 50, 220, 51">
        <area href="?il=CORUM" title="ÇORUM" shape="poly" alt="" coords="250, 81, 225, 83, 220, 72, 222, 52, 229, 49, 225, 45, 232, 37, 245, 39, 250, 45, 248, 54, 259, 61, 257, 71, 251, 74">
        <area href="?il=DENIZLI" title="DENİZLİ" shape="poly" alt="" coords="109, 132, 114, 142, 107, 148, 109, 156, 101, 160, 102, 167, 92, 184, 87, 181, 88, 177, 78, 170, 76, 163, 82, 156, 77, 144, 82, 138, 97, 137">
        <area href="?il=DIYARBAKIR" title="DİYARBAKIR" shape="poly" alt="" coords="380, 162, 381, 149, 375, 151, 360, 145, 359, 140, 362, 134, 370, 135, 391, 126, 395, 123, 406, 123, 414, 117, 421, 124, 414, 129, 412, 152, 407, 155, 403, 152, 400, 156">
        <area href="?il=DUZCE" title="DÜZCE" shape="poly" alt="" coords="143, 45, 151, 43, 164, 46, 153, 57, 143, 57, 139, 52">
        <area href="?il=EDIRNE" title="EDİRNE" shape="poly" alt="" coords="32, 38, 34, 49, 29, 52, 17, 52, 14, 47, 23, 38, 23, 30, 31, 26, 33, 21, 25, 13, 34, 6, 42, 6, 41, 29">
        <area href="?il=ELAZIG" title="ELAZIĞ" shape="poly" alt="" coords="379, 108, 388, 105, 392, 118, 386, 123, 389, 126, 373, 134, 365, 135, 337, 129, 347, 113, 366, 118">
        <area href="?il=ERZINCAN" title="ERZİNCAN" shape="poly" alt="" coords="385, 75, 397, 90, 391, 93, 387, 89, 370, 93, 349, 101, 345, 107, 338, 107, 337, 93, 337, 82, 349, 74, 365, 80, 372, 80">
        <area href="?il=ERZURUM" title="ERZURUM" shape="poly" alt="" coords="432, 61, 446, 73, 440, 75, 446, 86, 439, 96, 426, 100, 421, 94, 413, 96, 411, 92, 400, 93, 387, 75, 397, 71, 394, 58, 410, 43, 413, 52, 425, 49, 428, 38, 433, 39, 445, 45, 444, 55">
        <area href="?il=ESKISEHIR" title="ESKİŞEHİR" shape="poly" alt="" coords="166, 108, 158, 112, 150, 105, 139, 110, 127, 106, 117, 89, 124, 85, 132, 75, 144, 77, 160, 80, 165, 89">
        <area href="?il=GAZIANTEP" title="GAZİANTEP" shape="poly" alt="" coords="332, 186, 319, 191, 305, 181, 294, 189, 290, 185, 291, 177, 300, 171, 306, 173, 317, 167, 316, 161, 332, 165, 326, 172">
        <area href="?il=GIRESUN" title="GİRESUN" shape="poly" alt="" coords="348, 75, 344, 79, 332, 70, 329, 60, 325, 55, 329, 45, 346, 45, 353, 42, 354, 48, 346, 59, 352, 64">
        <area href="?il=GUMUSHANE" title="GÜMÜŞHANE" shape="poly" alt="" coords="377, 58, 369, 79, 351, 75, 353, 66, 346, 59, 355, 49, 368, 56, 372, 52">
        <area href="?il=HAKKARI" title="HAKKARİ" shape="poly" alt="" coords="516, 157, 504, 166, 502, 159, 497, 158, 490, 163, 477, 158, 478, 147, 495, 140, 495, 144, 503, 137, 509, 139">
        <area href="?il=HATAY" title="HATAY" shape="poly" alt="" coords="278, 183, 291, 185, 294, 189, 292, 200, 295, 208, 288, 211, 281, 223, 275, 219, 270, 206, 281, 197, 277, 186">
        <area href="?il=IGDIR" title="IĞDIR" shape="poly" alt="" coords="490, 63, 499, 70, 492, 75, 473, 73, 466, 66, 473, 62">
        <area href="?il=ISPARTA" title="ISPARTA" shape="poly" alt="" coords="147, 170, 136, 171, 123, 154, 116, 158, 116, 152, 143, 131, 158, 146, 151, 151, 148, 160">
        <area href="?il=ISTANBUL" title="İSTANBUL" shape="poly" alt="" coords="115, 40, 103, 44, 98, 49, 92, 42, 84, 44, 67, 41, 66, 33, 72, 24, 92, 34">
        <area href="?il=IZMIR" title="İZMIR" shape="poly" alt="" coords="70, 143, 43, 143, 36, 150, 36, 143, 25, 135, 21, 138, 14, 132, 17, 118, 25, 128, 32, 128, 26, 119, 35, 111, 30, 111, 31, 100, 38, 96, 47, 96, 46, 107, 40, 114, 42, 123, 56, 133, 59, 129">
        <area href="?il=K.MARAS" title="KAHRAMANMARAŞ" shape="poly" alt="" coords="319, 152, 315, 159, 318, 160, 318, 165, 307, 173, 301, 170, 295, 174, 290, 169, 284, 170, 284, 159, 284, 145, 295, 130, 310, 130, 315, 134, 319, 139">
        <area href="?il=KARABUK" title="KARABÜK" shape="poly" alt="" coords="195, 48, 184, 54, 176, 46, 172, 45, 176, 35, 192, 28, 197, 31, 193, 39">
        <area href="?il=KARAMAN" title="KARAMAN" shape="poly" alt="" coords="199, 200, 181, 206, 180, 191, 187, 184, 184, 181, 194, 166, 201, 168, 211, 160, 216, 168, 221, 173, 218, 181, 197, 190">
        <area href="?il=KARS" title="KARS" shape="poly" alt="" coords="474, 62, 466, 67, 447, 72, 435, 62, 444, 55, 445, 47, 452, 47, 451, 41, 462, 30, 470, 37, 469, 49">
        <area href="?il=KASTAMONU" title="KASTAMONU" shape="poly" alt="" coords="231, 38, 225, 46, 228, 51, 221, 54, 214, 52, 214, 46, 197, 47, 193, 40, 200, 31, 191, 27, 191, 17, 204, 13, 229, 14, 227, 23, 236, 23, 232, 29">
        <area href="?il=KAYSERI" title="KAYSERİ" shape="poly" alt="" coords="294, 131, 284, 145, 282, 137, 266, 150, 265, 156, 255, 156, 254, 145, 245, 136, 250, 128, 247, 122, 247, 115, 252, 118, 267, 106, 285, 111, 291, 108, 299, 114, 293, 122">
        <area href="?il=KIRIKKALE" title="KIRIKKALE" shape="poly" alt="" coords="222, 90, 205, 103, 201, 95, 205, 84, 211, 81, 212, 70, 219, 73, 225, 82">
        <area href="?il=KIRKLARELI" title="KIRKLARELİ" shape="poly" alt="" coords="70, 22, 59, 26, 53, 34, 45, 29, 42, 5, 48, 2, 55, 8, 68, 8">
        <area href="?il=KIRSEHIR" title="KIRŞEHİR" shape="poly" alt="" coords="238, 108, 226, 123, 220, 115, 208, 107, 207, 101, 222, 90, 232, 94">
        <area href="?il=KILIS" title="KİLİS" shape="poly" alt="" coords="319, 192, 309, 199, 295, 191, 295, 188, 307, 180">
        <area href="?il=KOCAELI" title="KOCAELİ" shape="poly" alt="" coords="114, 61, 103, 62, 105, 56, 113, 52, 99, 48, 116, 39, 121, 40, 125, 36, 124, 50">
        <area href="?il=KONYA" title="KONYA" shape="poly" alt="" coords="231, 173, 219, 181, 222, 172, 213, 161, 202, 168, 197, 166, 185, 181, 187, 186, 181, 190, 159, 171, 149, 169, 150, 153, 159, 147, 148, 134, 155, 128, 159, 114, 165, 108, 169, 114, 184, 114, 193, 108, 204, 114, 208, 108, 220, 116, 210, 134, 204, 131, 200, 140, 206, 150, 223, 150, 232, 157">
        <area href="?il=KUTAHYA" title="KÜTAHYA" shape="poly" alt="" coords="126, 105, 113, 121, 109, 113, 88, 119, 81, 106, 90, 91, 102, 83, 109, 82, 109, 86, 119, 88">
        <area href="?il=MALATYA" title="MALATYA" shape="poly" alt="" coords="338, 129, 360, 134, 361, 139, 353, 143, 340, 140, 335, 145, 320, 150, 319, 138, 310, 127, 316, 122, 314, 114, 319, 112, 340, 107, 346, 107, 346, 115">
        <area href="?il=MANISA" title="MANİSA" shape="poly" alt="" coords="81, 138, 75, 143, 69, 142, 61, 129, 57, 134, 44, 123, 41, 114, 47, 108, 48, 97, 60, 98, 69, 107, 80, 106, 88, 118, 82, 123">
        <area href="?il=MARDIN" title="MARDİN" shape="poly" alt="" coords="430, 171, 419, 173, 409, 172, 391, 180, 382, 163, 401, 156, 403, 150, 407, 155, 413, 154, 419, 156, 427, 157, 434, 152, 429, 163">
        <area href="?il=MERSIN" title="MERSİN" shape="poly" alt="" coords="245, 195, 240, 191, 221, 209, 218, 207, 209, 215, 197, 215, 183, 216, 182, 206, 198, 201, 198, 190, 221, 180, 233, 173, 242, 170, 253, 189">
        <area href="?il=MUGLA" title="MUĞLA" shape="poly" alt="" coords="90, 206, 82, 200, 83, 190, 80, 192, 77, 194, 67, 185, 55, 194, 57, 189, 38, 189, 63, 180, 36, 178, 37, 172, 43, 172, 40, 166, 45, 160, 52, 163, 68, 162, 77, 164, 77, 170, 87, 176, 87, 181, 99, 183, 103, 182, 97, 196, 91, 201">
        <area href="?il=MUS" title="MUŞ" shape="poly" alt="" coords="456, 105, 444, 107, 436, 114, 436, 117, 422, 123, 418, 118, 415, 118, 413, 114, 417, 104, 414, 102, 413, 97, 423, 95, 428, 99, 440, 97, 446, 87">
        <area href="?il=NEVSEHIR" title="NEVŞEHIR" shape="poly" alt="" coords="246, 118, 247, 125, 251, 128, 247, 137, 234, 138, 227, 123, 239, 108, 239, 103, 243, 105">
        <area href="?il=NIGDE" title="NİĞDE" shape="poly" alt="" coords="254, 158, 243, 170, 233, 175, 233, 156, 223, 148, 235, 135, 248, 139, 254, 146">
        <area href="?il=ORDU" title="ORDU" shape="poly" alt="" coords="326, 47, 325, 54, 328, 60, 325, 60, 324, 65, 316, 65, 318, 59, 308, 60, 308, 55, 298, 55, 290, 48, 301, 40, 313, 44, 317, 40">
        <area href="?il=OSMANIYE" title="OSMANİYE" shape="poly" alt="" coords="288, 186, 278, 182, 278, 178, 272, 178, 279, 158, 283, 159, 283, 170, 291, 170, 295, 174, 291, 178">
        <area href="?il=RIZE" title="RİZE" shape="poly" alt="" coords="408, 28, 413, 34, 408, 44, 394, 57, 390, 57, 388, 49, 385, 43, 393, 38">
        <area href="?il=SAKARYA" title="SAKARYA" shape="poly" alt="" coords="144, 46, 140, 52, 142, 57, 129, 68, 117, 61, 125, 49, 126, 37">
        <area href="?il=SAMSUN" title="SAMSUN" shape="poly" alt="" coords="300, 40, 290, 48, 283, 50, 280, 46, 271, 51, 250, 44, 245, 39, 250, 35, 257, 38, 257, 34, 262, 25, 270, 22, 274, 25, 274, 30, 284, 36, 286, 34">
        <area href="?il=SIIRT" title="SİİRT" shape="poly" alt="" coords="452, 148, 444, 154, 436, 154, 436, 150, 424, 143, 430, 133, 442, 134, 454, 140, 457, 140, 461, 142, 461, 146">
        <area href="?il=SINOP" title="SİNOP" shape="poly" alt="" coords="261, 27, 256, 38, 252, 35, 244, 37, 234, 37, 233, 31, 237, 24, 229, 24, 231, 14, 242, 14, 248, 8, 252, 11, 250, 16">
        <area href="?il=SIVAS" title="SİVAS" shape="poly" alt="" coords="339, 108, 315, 112, 316, 120, 311, 130, 295, 130, 295, 119, 300, 114, 293, 108, 284, 112, 270, 105, 278, 93, 275, 83, 287, 82, 294, 73, 305, 72, 309, 74, 317, 64, 323, 65, 327, 60, 334, 71, 342, 77, 338, 84">
        <area href="?il=SANLIURFA" title="ŞANLIURFA" shape="poly" alt="" coords="391, 181, 368, 191, 353, 191, 346, 186, 334, 186, 327, 173, 332, 167, 355, 154, 359, 145, 377, 151, 380, 149, 382, 161">
        <area href="?il=SIRNAK" title="ŞIRNAK" shape="poly" alt="" coords="479, 147, 474, 157, 466, 160, 463, 157, 456, 168, 451, 170, 448, 162, 431, 172, 432, 161, 436, 152, 444, 152, 455, 146, 461, 148, 462, 142">
        <area href="?il=TEKIRDAG" title="TEKİRDAĞ" shape="poly" alt="" coords="72, 26, 68, 31, 65, 41, 52, 42, 46, 52, 39, 53, 38, 49, 35, 50, 35, 47, 33, 37, 44, 27, 53, 32, 60, 27">
        <area href="?il=TOKAT" title="TOKAT" shape="poly" alt="" coords="317, 62, 316, 68, 311, 73, 295, 73, 286, 83, 277, 83, 275, 83, 272, 77, 267, 78, 259, 72, 267, 63, 279, 59, 284, 59, 285, 51, 293, 48, 303, 54, 306, 54, 308, 59">
        <area href="?il=TRABZON" title="TRABZON" shape="poly" alt="" coords="385, 42, 391, 55, 377, 56, 373, 51, 369, 57, 355, 50, 354, 42, 360, 39, 376, 43">
        <area href="?il=TUNCELI" title="TUNCELİ" shape="poly" alt="" coords="379, 108, 366, 119, 350, 114, 344, 110, 350, 103, 360, 96, 380, 90, 388, 90, 389, 93, 381, 100">
        <area href="?il=USAK" title="UŞAK" shape="poly" alt="" coords="106, 135, 97, 138, 83, 138, 81, 124, 91, 117, 108, 115, 114, 123">
        <area href="?il=VAN" title="VAN" shape="poly" alt="" coords="499, 140, 496, 143, 494, 141, 478, 147, 461, 143, 457, 126, 466, 108, 459, 104, 465, 98, 463, 95, 471, 89, 480, 95, 482, 90, 492, 86, 499, 119, 505, 120">
        <area href="?il=YALOVA" title="YALOVA" shape="poly" alt="" coords="106, 57, 103, 64, 89, 64, 78, 58, 88, 52">
        <area href="?il=YOZGAT" title="YOZGAT" shape="poly" alt="" coords="269, 108, 252, 119, 246, 105, 240, 106, 233, 95, 224, 90, 225, 86, 250, 80, 252, 74, 261, 71, 267, 78, 271, 76, 278, 92">
        <area href="?il=ZONGULDAK" title="ZONGULDAK" shape="poly" alt="" coords="171, 28, 176, 35, 172, 44, 162, 47, 151, 45, 154, 35">
    </map>
<br>
<br>
<?
if(($_GET['il'] == '')){
  
}else{
 
?>
<table>
    <thead>
    <tr>
        <th>İL</th>
        <th>Son Durum</th>
        <th>5 Günlük Tahmin</th>
    </tr>
    </thead><thead>
    </thead><tbody>
    <tr>
        <td><b><? echo $_GET["il"]; ?></b></td>
        <td><img src="http://www.mgm.gov.tr/sunum/sondurum-klasik-5070.aspx?m=<? echo $_GET["il"]; ?>" alt="<? echo $_GET["il"]; ?> Son Durum" style="max-width:100px;"></td>
        <td><img src="http://www.mgm.gov.tr/sunum/tahmin-klasik-5070.aspx?m=<? echo $_GET["il"]; ?>&amp;basla=1&amp;bitir=5" alt="<? echo $_GET["il"]; ?> İli 5 Günlük Tahmin" style="max-width:250px;"></td>
    </tr>
    </tbody>
</table>
<?
}
?>
</center>

Üstteki vermiş olduğum kodu test etmek için tıklayınız.

Hastebin Bağlantısı için tıklayınız.


___
 


Son düzenleme:

kayra06

Demir Madencisi
Mesajlar
291
En iyi cevaplar
0
Beğeniler
178
Puanları
650
Ruh hali
Güzel bir paylaşim olmuş.
 

KaanGunlu

Işık Taşı Madencisi
Mesajlar
3,239
En iyi cevaplar
0
Beğeniler
4,843
Puanları
6,840
Tıklamalı değilde üstüne geldiğimiz anda gösterme yapsan çok daha güzel olur :)
 

Üst