(Позвольте мне объяснить, что я пытаюсь сделать, поскольку вам может быть интересно, что это сервис SoapClient для отелей, позволяющий проверять идентификаторы их клиентов)
Код: Выделить всё
try
{
//Cant change the left side of the const because of the SoapClient
$inputs = array(
"TCKimlikNo" => $IDN,
"Ad" => $NAME,
"Soyad" => $SURNAME,
"DogumYili" => $BIRTH
);
$connect = new SoapClient('https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL');
$result = $connect->TCKimlikNoDogrula($inputs);
if ($result->TCKimlikNoDogrulaResult){
echo 'IDN correct';
}
else
{
echo 'IDN incorrect';
}
}
catch (Exception $hata)
{
echo '! IDN is not available';
}
Я получил ошибку «ReferenceError: SoapClient не определен». Это может быть специальное сообщение об ошибке, поскольку я не смог найти такую же ошибку в Интернете.
Код: Выделить всё
ID Inquiry
function fnc()
{
try
{
let IDN = parseFloat("");
//I actually put real info here
const NAME = "";
const SURNAME = "";
const DateOfBirth = "";
const inputs =
{
TCKimlikNo: IDN,
Ad: NAME,
Soyad: SURNAME,
DogumYili: DateOfBirth
};
const soapClient = new SoapClient('https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL');
const resultt = soapClient.IDquestioning(inputs);
if (resultt.IDquestioningResult) {
alert('correct');
} else {
alert('incorrect');
}
} catch (error) {
alert(error);
}
}
Подробнее здесь: https://stackoverflow.com/questions/791 ... javascript
Мобильная версия