• 31-08-2017, 09:16:37
    #1
    PHP TC Kimlik Numarası Doğrulama Fonksiyonu
    <meta charset="utf-8">
    <?php
    	function tcno_dogrula($bilgiler){
    		$gonder = '<?xml version="1.0" encoding="utf-8"?>
    		<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    		<soap:Body>
    		<TCKimlikNoDogrula xmlns="http://tckimlik.nvi.gov.tr/WS">
    		<TCKimlikNo>'.$bilgiler["tcno"].'</TCKimlikNo>
    		<Ad>'.$bilgiler["isim"].'</Ad>
    		<Soyad>'.$bilgiler["soyisim"].'</Soyad>
    		<DogumYili>'.$bilgiler["dogumyili"].'</DogumYili>
    		</TCKimlikNoDogrula>
    		</soap:Body>
    		</soap:Envelope>';
    		$ch = curl_init();
    		curl_setopt($ch, CURLOPT_URL,            "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx" );
    		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
    		curl_setopt($ch, CURLOPT_POST,           true );
    		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    		curl_setopt($ch, CURLOPT_HEADER, FALSE);
    		curl_setopt($ch, CURLOPT_POSTFIELDS,    $gonder);
    		curl_setopt($ch, CURLOPT_HTTPHEADER,     array(
    		'POST /Service/KPSPublic.asmx HTTP/1.1',
    		'Host: tckimlik.nvi.gov.tr',
    		'Content-Type: text/xml; charset=utf-8',
    		'SOAPAction: "http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula"',
    		'Content-Length: '.strlen($gonder)
    		));
    		$gelen = curl_exec($ch);
    		curl_close($ch);
    	    return strip_tags($gelen);
    	}
    $bilgiler = array(
    "isim"      => "FURKAN",
    "soyisim"   => "ŞİMŞEK",
    "dogumyili" => "xxxx",
    "tcno"      => "xxxxx"
    );
    $sonuc = tcno_dogrula($bilgiler);
    if($sonuc=="true"){
    echo "Doğrulama başarılı";
    }else{
    echo "Doğrulama başarısız";
    }
    ?>
  • 31-08-2017, 09:17:40
    #2
    teşekkürler işime yarayacak
  • 01-09-2017, 03:02:21
    #3
    Bunu bi foruma bagliyabilirmiyiz gelistirebilsek
  • 01-09-2017, 03:05:24
    #4
    Kimlik doğrulama veya yönetimden onay bekliyor.
    ad ve soyadı tamamen büyük yazmak gerekiyor sanırım bilginize
  • 01-09-2017, 05:31:20
    #5
    yorumum bulunsun işime yarayacak
  • 11-09-2017, 22:25:09
    #6
    şunu c# ye uyarlayacak biri yokmu?
  • 11-09-2017, 22:42:26
    #7
    deSefa adlı üyeden alıntı: mesajı görüntüle
    şunu c# ye uyarlayacak biri yokmu?


    https://www.youtube.com/watch?v=2d272NhgVuU



    https://www.google.com.tr/search?cli...k1.zklc70n1ynU
  • 12-09-2017, 03:01:55
    #8
    güzel bir şey .
  • 12-09-2017, 04:43:29
    #9
    Teşekkürler hocam