<?php
if(isset($_POST["tc_no"])){
header("Content-type: text/html; charset=utf-8");
$ad = strtoupper(karakter_duzeltme(trim($_POST["ad"])));
$soyad = strtoupper(karakter_duzeltme(trim($_POST["soyad"])));
$dogum_yili = trim($_POST["dogum_yili"]);
$tc_no = trim($_POST["tc_no"]);
settype($tc_no, "double");
try {
$veriler = array(
"TCKimlikNo" => $tc_no,
"Ad" => $ad,
"Soyad" => $soyad,
"DogumYili" => $dogum_yili
);
$baglan = new SoapClient("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL");
$sonuc = $baglan->TCKimlikNoDogrula($veriler);
if ($sonuc->TCKimlikNoDogrulaResult == 1){
echo 'T.C Kimlik Numarası Doğru !';
} else {
echo 'T.C Kimlik Numarası Yanlış !';
}
} catch (Exception $hata){
echo 'T.C Kimlik Numarası Bulunmamaktadır...';
}
}
function karakter_duzeltme($gelen){
$karakterler = array("ç","ğ","ı","i","ö","ş","ü");
$degistir = array("Ç","Ğ","I","İ","Ö","Ş","Ü");
return str_replace($karakterler, $degistir, $gelen);
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>T.C Kimlik No Sorgulama</title>
</head>
<body>
<form action="" method="post">
Ad:<div><input type="text" name="ad" /></div>
Soyad:<div><input type="text" name="soyad" /></div>
Doğum Yılı:<div><input type="text" name="dogum_yili" /></div>
T.C No:<div><input type="text" name="tc_no" /></div>
<input type="submit" value="Sorgula" />
</form>
</body>
</html>
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>T.C Kimlik No Sorgulama</title>
</head>
<body>
<form action="" method="post">
Ad:<div><input type="text" name="ad" /></div>
Soyad:<div><input type="text" name="soyad" /></div>
Doğum Yılı:<div><input type="text" name="dogum_yili" /></div>
T.C No:<div><input type="text" name="tc_no" /></div>
<input type="submit" value="Sorgula" />
</form>
</body>
</html>
- Output for 4.4.2 - 4.4.9
- Parse error: syntax error, unexpected '{' in /in/BX0Ig on line 12
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
- Parse error: parse error, unexpected '{' in /in/BX0Ig on line 12
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error in /in/BX0Ig on line 12
Process exited with code 255.
preferences:
232.41 ms | 401 KiB | 369 Q