https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?op=TCKimlikNoDogrula

Bu adresten soap ile kontrol edebilirsiniz.
Windows service kullanıyorlar (Neden haala WS kullanırlar anlamam. İşi neden zora sokarlar ki? Jsonla gitsin yau ne karater sorunu olur nede soap için apache eklentisi gerekir.).

Al sana PHP function (denemedim fakat yazım hatası yapmadıysam çalışması lazım)


function check_tc_no($tc_no,$firstname,$lastname,$birth_year){

$sender = '



'.$tc_no.'
'.$firstname.'
'.$lastname.'
'.$birth_year.'


';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx" );
curl_setopt($ch, CURLOPT_POST,true );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true );
curl_setopt($ch, CURLOPT_POSTFIELDS,$sender);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
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($sender)
));

$incomming = curl_exec($ch);
curl_close($ch);
$incomming = strip_tags($incomming);
return $incomming;
}


Bu kodu php dosyanın içine yapıştır

Kullanımı:

//START örnek bilgiler
$tc_no = '123123123123';
$isim = 'AHMET';
$soyisim = 'DURSUN';
$dogum_yili = '1923';
// END örenk bilgiler bitti
$kimlik_no_dogrumu = check_tc_no($tc_no,$isim,$soyisim,$dogum_yili);

if($kimlik_no_dogrumu == true){
echo "Evet Kimlik no doğru";
}elseif($kimlik_no_dogrumu == false){
echo "Hayır kimlik no yanlış";
}else{
echo "Üzgünüm bir hata oluştu. Sistemden olumlu yada olumsuz cevap alamadım";

}