<?php $domain = $_POST['araclar']; ?>

<style media="screen">
/* Genel link stilleri */
.custom-link {
    color: #fff;
    text-decoration: none;
    margin: 0 6px;
    padding: 5px 7px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.custom-link:hover {
    background-color: #fff;
    color: #000;
}

/* Mobilde linklerin gizlenmesi */
@media (max-width: 768px) {
    .links {
        display: none; /* Linkleri gizle */
    }
    .domain-submit-box {
        top: 100%;
        right: 0;
        width: 100%;
        margin-top: 2px;
    }
    .domain-submit-box .btn-primary {
        width: 100%;
    }
}

@media only screen and (max-width: 1124px) {
    .domain-search {
        border-radius: 9px 9px 0px 0px;
    }
    .domain-submit-box button {
        border-radius: 0px 0px 9px 9px;
    }
    .domain-ext {
        display: none;
    }

}
[class*=" ssicon-"],
[class^="ssicon-"] {
    font-size: 18px;
    margin-top: 7px;
    color: black;
}
.ozellik-alani:hover {
    background-color: #eff1fa;
    border-radius: 5px;
}
.disnone {
    display: none;
}

usd,
try {
    display: none;
}

html.TRY try {
    display: inline-block;
}

html.TRY usd {
    display: none;
}

html.USD usd {
    display: inline-block;
}

html.USD try {
    display: none;
}

.domain-whois a,
button {
    text-decoration: none;
}
/* Masaüstünde fiyat gizlensin */
.fiyat,
.kime-ait {
  display: none;
}

/* Mobilde fiyat görünsün */
@media (max-width: 768px) {
    span.price {
        font-size: 100% !important;
    }
    .domain-price-old {
        display: none !important;
    }
    .mobile-center {
        justify-content: center !important;
    }
    .domain-button {
        padding: 5px;
    }
    .whois-results .result .domain-button .whois {
        display: none !important;
    }
    .mobile-prices {
        display: none !important;
    }
    .kime-ait {
        color: #455cc7 !important;
        display: block !important;
    }
    .fiyat{
      background-color: rgba(0, 0, 0, 0) !important;
      border: 1px solid black;
      font-size: 18px;
      font-weight: 600;
    padding: 4px 12px;
    text-align: center;
        border-radius: 3px;
        display: block;
        color: black;
    }
    /*.fiyat {
        font-size: 18px;
        line-height: 32px;
        display: block;
        background-color: #4caf50;
        min-width: 118px;
        color: #fff;
        border-radius: 3px;
        font-weight: 600;
        padding: 4px 12px;
        text-align: center;
        cursor: pointer;
        text-decoration: none;
    }*/
}

register {
    color: #4caf50;
}
transfer {
    color: #455cc7;
}
dikcizgi {
    margin-right: 5px;
    margin-left: 5px;
    border-right: 1px solid black;
}

@media (min-width: 1400px) {
    .container-xxl,
    .container-xl,
    .container-lg,
    .container-md,
    .container-sm,
    .container {
        max-width: 1200px;
    }
}
</style>
<section class="bg-warning-2">
    <div class="domain-search-box home-9-hero pt-60 pb-60 px-2" style="background-image: url(/assets/img/home-domain-search.webp);">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="col-12">
                        <div class="domain-form-one mx-auto position-relative mt-8 sal-animate ss-domain_pricing_content col-lg-12 heading-white mb-4 mb-sm-4 mb-lg-0">
                            <div class="row domain-form-container ss-animate fadeInUp ss-animated">
                                <form class="col-12 domain-form" action="" method="POST">
                                    <div class="form-group domain-name">
                                        <div class="domain-name-background"></div>
                                        <input class="" id="araclar" name="araclar" type="text" placeholder="DNS bilgisini öğrenmek istediğiniz alan adını yazın." />
                                    </div>
                                    <div class="form-group domain-select">
                                        <input type="submit" name="submit" value="Sorgula" />
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>

                    <div class="links mt-4 text-center">
                        <a target="_blank" href="https://serversistemleri.com/domain-sorgulama" class="custom-link"> <i class="fa-solid fa-chevron-right" style="margin-right: 5px; font-size: 15px;"></i>Domain Sorgulama</a>
                        <a target="_blank" href="https://serversistemleri.com/domain-transferi" class="custom-link"><i class="fa-solid fa-chevron-right" style="margin-right: 5px; font-size: 15px;"></i>Domain Transfer</a>
                        <a target="_blank" href="https://sspanel.serversistemleri.com/" class="custom-link"><i class="fa-solid fa-chevron-right" style="margin-right: 5px; font-size: 15px;"></i>Domain Yenile</a>
                        <a target="_blank" href="https://serversistemleri.com/whois-sorgulama" class="custom-link"><i class="fa-solid fa-chevron-right" style="margin-right: 5px; font-size: 15px;"></i>Whois Sorgulama</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>


<?php

   if(isset($_POST['submit']))
       {
         $domain_regex = '/[a-z\d][a-z\-\d\.]+[a-z\d]/i';

         $dns_a = dns_get_record($domain, DNS_A);
         $dns_ns = dns_get_record($domain, DNS_NS);
         $dns_mx = dns_get_record($domain, DNS_MX);
         $dns_soa = dns_get_record($domain, DNS_SOA);
         $dns_txt = dns_get_record($domain, DNS_TXT);
         $dns_aaaa = dns_get_record($domain, DNS_AAAA);
         $dns_all = dns_get_record($domain, DNS_ALL);
 ?>
        <div class="ss-section ss-uniqe_properties">

          <div class="container">
              <div class="row">
                <div class="col-md-12">
                  <h3 class="mb-4 text-center" style="color:white;">Sorgulama Sonuçları</h3>
                </div>
                 <?php if ($dns_a[0]['type'] == "A"): ?>
                  <div class="col-md-12">
                      <div class="table-responsive">
                      <table class="table">
                          <tbody>
                           <tr>
                              <td colspan="4" class="table-header"></td>
                          </tr>
                          <tr>
                              <td class="table-first"><?php echo($dns_a[0]['type']); ?></td>
                              <td class="table-first"><?php echo($dns_a[0]['class']); ?></td>
                              <td class="table-first"><?php echo($dns_a[0]['ttl']); ?></td>
                              <td class="table-first"><?php foreach($dns_a as $value) { echo($value['ip']); } ?></td>
                          </tr>
                          <tr>
                              <td class="table-first"><?php echo($dns_ns[0]['type']); ?></td>
                              <td class="table-first"><?php echo($dns_ns[0]['class']); ?></td>
                              <td class="table-first"><?php echo($dns_ns[0]['ttl']); ?></td>
                              <td class="table-first"><?php foreach($dns_ns as $value) { ?><?php  echo($value['target']); ?> (<?php echo(gethostbyname($value['target'])) ?>) <br> <?php } ?></td>
                          </tr>
                          <tr>
                              <td class="table-first"><?php echo($dns_mx[0]['type']); ?></td>
                              <td class="table-first"><?php echo($dns_mx[0]['class']); ?></td>
                              <td class="table-first"><?php echo($dns_mx[0]['ttl']); ?></td>
                              <td class="table-first"><?php foreach($dns_mx as $value) { ?>[<?php  echo($value['pri']); ?>] <?php  echo($value['target']); ?> (<?php echo(gethostbyname($value['target'])) ?>) <br> <?php } ?></td>
                          </tr>
                          <tr style="line-height: 10px;">
                              <td class="table-first"><?php echo($dns_soa[0]['type']); ?></td>
                              <td class="table-first"><?php echo($dns_soa[0]['class']); ?></td>
                              <td class="table-first"><?php echo($dns_soa[0]['ttl']); ?></td>
                              <td>
                                  <p>Email : <?php $email = explode(".", $dns_soa[0]['rname']); echo($email[0].'@'.$email[1].'.'.$email[2]); ?></p>
                                  <p>Serial : <?php echo($dns_soa[0]['serial']); ?></p>
                                  <p>Refresh : <?php echo($dns_soa[0]['refresh']); ?></p>
                                  <p>Retry : <?php echo($dns_soa[0]['retry']); ?></p>
                                  <p>Expire : <?php echo($dns_soa[0]['expire']); ?></p>
                                  <p>Minimum TTL : <?php echo($dns_soa[0]['minimum-ttl']); ?></p>
                              </td>
                            </tr>
                              <?php foreach ($dns_txt as $value): ?>
                                <tr>
                                    <td class="table-first"><?php echo($dns_txt[0]['type']); ?></td>
                                    <td class="table-first"><?php echo($dns_txt[0]['class']); ?></td>
                                    <td class="table-first"><?php echo($dns_txt[0]['ttl']); ?></td>
                                    <td class="table-first"><?php echo($value['txt']); ?></td>
                                </tr>
                              <?php endforeach; ?>
                          </tr>
                      </tbody>
                    </table>
                  </div>
                  </div>
                  <?php else: ?>
                  <div class="col-md-12">

                  <h4 style="text-align:center;">SONUÇ BULUNAMADI</h4>
                    </div>
                <?php endif; ?>

              </div>
          </div>
        </div>



   <?php
             }
   ?>
   <section class="pt-60" style="margin-top:25px;">
       <div class="container">
           <div class="row">
               <div class="col-12">
                   <div class="card">
                       <div class="card-body p-xl-8">
                           <div class="tab-content">
                                   <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-xl-3 g-3">
                                       <a href="https://serversistemleri.com/araclar/dns-sorgulama" class="col" style="text-decoration: none;color:black;">
                                           <div class="tech-partner transition bg-white px-6 py-8 rounded-2 text-center h-100 border border-dark border-opacity-10">
                                               <img src="<?php echo $site_url; ?>design/images/dns-icon.webp" alt="icon" class="img-fluid w-12" />
                                               <h6 class="fw-bold mt-4">DNS Sorgulama</h6>
                                               <p>Domain adresinizin DNS bilgilerini anında sorgulayabilirsiniz!</p>
                                           </div>
                                       </a>
                                       <a href="https://serversistemleri.com/araclar/ssl-sorgulama" class="col" style="text-decoration: none;color:black;">
                                           <div class="tech-partner transition bg-white px-6 py-8 rounded-2 text-center h-100 border border-dark border-opacity-10">
                                               <img src="<?php echo $site_url; ?>design/images/ssl-icon.webp" alt="icon" class="img-fluid w-12" />
                                               <h6 class="fw-bold mt-4">SSL Sorgulama</h6>
                                               <p>Domain Adresinizin SSL hakkındaki tüm bilgilere bir tıkla ulaşabilirsiniz!</p>
                                           </div>
                                       </a>
                                       <a href="https://serversistemleri.com/whois-sorgulama" class="col" style="text-decoration: none;color:black;">
                                           <div class="tech-partner transition bg-white px-6 py-8 rounded-2 text-center h-100 border border-dark border-opacity-10">
                                               <img src="<?php echo $site_url; ?>design/images/whois-icon.webp" alt="icon" class="img-fluid w-12" />
                                               <h6 class="fw-bold mt-4">Whois Sorgulama</h6>
                                               <p>Domain adresiniz hakkında tüm bilgilere ulaşabilirsiniz!</p>
                                           </div>
                                       </a>
                                       <a href="https://serversistemleri.com/araclar/ip-sorgulama" class="col" style="text-decoration: none;color:black;">
                                           <div class="tech-partner transition bg-white px-6 py-8 rounded-2 text-center h-100 border border-dark border-opacity-10">
                                               <img src="<?php echo $site_url; ?>design/images/ip-icon.webp" alt="icon" class="img-fluid w-12" />
                                               <h6 class="fw-bold mt-4">IP Sorgulama</h6>
                                               <p> <b>IP</b> adresi hakkında tüm detaylara anında ulaşabilirsiniz! </p>
                                           </div>
                                       </a>
                                       <a href="https://serversistemleri.com/araclar/dmarc-sorgulama" class="col" style="text-decoration: none;color:black;">
                                           <div class="tech-partner transition bg-white px-6 py-8 rounded-2 text-center h-100 border border-dark border-opacity-10">
                                               <img src="<?php echo $site_url; ?>design/images/dmarc-icon.webp" alt="icon" class="img-fluid w-12" />
                                               <h6 class="fw-bold mt-4">DMARC Sorgulama</h6>
                                               <p>Bir domain adresinin <b> DMARC </b> bilgilerini doğrulayabilirsiniz!</p>
                                           </div>
                                       </a>
                                       <a href="https://serversistemleri.com/araclar/mx-sorgulama" class="col" style="text-decoration: none;color:black;">
                                           <div class="tech-partner transition bg-white px-6 py-8 rounded-2 text-center h-100 border border-dark border-opacity-10">
                                               <img src="<?php echo $site_url; ?>design/images/mx-icon.webp" alt="icon" class="img-fluid w-12" />
                                               <h6 class="fw-bold mt-4">MX Sorgulama</h6>
                                               <p>Domain adresinizin <b>MX</b> bilgilerini anında sorgulayabilirsiniz!</p>
                                           </div>
                                       </a>
                                   </div>
                               </div>
                       </div>
                   </div>
               </div>
           </div>
       </div>
   </section>
   <div class="pt-60 pb-60">
           <div class="container">
               <div class="row g-4">
                   <div class="col-md-12 col-lg-12 sal-animate" data-sal="slide-up" data-sal-duration="500" data-sal-delay="300" data-sal-easing="ease-in-out-sine">
                       <div class="card border-0 shadow-sm rounded-4 h-100">
                           <div class="card-body p-md-6 p-xl-8">
                               <h6 class="mb-4">
                                   DNS Sorgulama nedir?
                               </h6>
                               <p class="mb-0">
                                   DNS (Domain Name System), internetin temel taşlarından biri olan bir sistemdir. Web sitelerinin IP adresleriyle eşleşmesini sağlayarak, tarayıcınızın doğru adrese yönlendirilmesine yardımcı olur. DNS Sorgulama Aracımız, belirli bir domain adresine ait DNS kayıtlarını anında ve detaylı bir şekilde görüntülemenizi sağlar. Bu araç sayesinde NS (Name Server), A kayıtları, CNAME, TXT ve diğer DNS bilgilerini kolayca öğrenebilirsiniz. Özellikle teknik destek ekipleri ve site sahipleri için, hızlı sorun tespiti ve çözümü sunan bu araç, zamandan tasarruf etmenizi sağlar.
                               </p>
                           </div>
                       </div>
                   </div>
               </div>
           </div>
       </div>
    <?php
    $faq = [
      [
        "question" => "DNS nedir?",
        "answer" => "DNS, internet üzerindeki domain adlarını IP adreslerine çevirmek için kullanılan bir sistemdir."
      ],
      [
        "question" => "DNS sorgulama ne işe yarar?",
        "answer" => "DNS sorgulama, bir domainin DNS kayıtlarını hızlı bir şekilde öğrenmenizi sağlar."
      ],
      [
        "question" => "Hangi DNS kayıtlarını öğrenebilirim?",
        "answer" => "NS, A, CNAME, TXT gibi DNS kayıtlarını görüntüleyebilirsiniz."
      ],
      [
        "question" => "DNS sorgulama güvenli midir?",
        "answer" => "Evet, DNS sorgulama işlemi tamamen güvenlidir ve bilgi toplama amaçlıdır."
      ],
      [
        "question" => "DNS hatalarını nasıl çözebilirim?",
        "answer" => "DNS sorgulama aracı ile hatalı veya eksik kayıtları tespit edebilirsiniz."
      ],
      [
        "question" => "DNS sorgulama ücretsiz mi?",
        "answer" => "Evet, aracımız üzerinden ücretsiz DNS sorgulama yapabilirsiniz."
      ]
    ];
    ?>
       <div class="pb-60">
         <div class="container">
             <div class="row g-4 justify-content-center">
                 <div class="col-12">
                     <?php $faq_sira = 0; ?>
                     <div class="accordion border-0 vps-hosting-accordion" id="accordionFaq2">
                       <div class="row">
                         <?php foreach ($faq as $key): ?>
                             <?php $faq_sira = $faq_sira + 1; ?>
                           <div class="col-sm-6">
                             <div class="accordion-item border rounded-3 mb-4 sal-animate" data-sal="slide-up" data-sal-duration="500" data-sal-delay="300" data-sal-easing="ease-in-out-sine">
                                 <h2 class="accordion-header">
                                     <button class="accordion-button bg-transparent collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#faq-<?php echo $faq_sira; ?>" aria-expanded="false" aria-controls="faq-<?php echo $faq_sira; ?>">
                                         <span class="text-body fs-16 fw-bold"><?php echo $key['question']; ?></span>
                                     </button>
                                 </h2>
                                 <div id="faq-<?php echo $faq_sira; ?>" class="accordion-collapse collapse" data-bs-parent="#faq-<?php echo $faq_sira; ?>" style="">
                                     <div class="accordion-body pt-0">
                                         <?php echo $key['answer']; ?>
                                     </div>
                                 </div>
                             </div>
                           </div>
                         <?php endforeach; ?>
                       </div>
                     </div>
                 </div>
             </div>
         </div>
      </div>
