<?php
header('Content-type: text/html; charset=utf-8');
$client = new SoapClient("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL");
try{
$result = $client->TCKimlikNoDogrula(array( 'TCKimlikNo' => '11111111111','Ad' => 'MEHMET','Soyad' => 'MUTLU','DogumYili' => '1989'));
if($result->TCKimlikNoDogrulaResult){
echo 'TC Kimlik Numarası Geçerli';
}else{
echo 'TC Kimlik Numarası Hatalı';
}
}catch (Exception $ex){
echo $ex->faultstring;
}
?>
Etiket arşivi: Text Html
convert_smart_quotes
Microsoft World’e ait özel karakterleri temizlemek için,
function convert_smart_quotes($text){
$text = mb_convert_encoding($text, 'HTML-ENTITIES', 'UTF-8');
// UTF-8 karakteleri cevir
$text = str_replace(
array("\xe2\x80\x98", "\xe2\x80\x99", "\xe2\x80\x9c", "\xe2\x80\x9d", "\xe2\x80\x93", "\xe2\x80\x94", "\xe2\x80\xa6"),
array("'", "'", '"', '"', '-', '--', '...'),
$text);
// Windows-1252 karakterleri cevir
$text = str_replace(
array(chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(133)),
array("'", "'", '"', '"', '-', '--', '...'),
$text);
// HTML Kod karakterlerini cevir
$text = str_replace(
array("‘", "’", "“", "”", "–", "—", "…"),
array("'", "'", '"', '"', '-', '--', '...'),
$text);
// Windows-1252 karakterleri cevir
$text = str_replace(
array("‘", "’", "“", "”", "–", "—", "…"),
array("'", "'", '"', '"', '-', '--', '...'),
$text);
// Turkce karakterleri cevir
$text = str_replace(
array("Ğ", "ğ", "Ö", "ö", "Ç", "ç", "Ş", "ş", "İ", "ı", "Ü", "ü"),
array("Ğ", "ğ", 'Ö', 'ö', 'Ç', 'ç', 'Ş', 'ş', 'İ', 'ı', 'Ü', 'ü'),
$text);
return $text;
}
convert_smart_quotes
function convert_smart_quotes($text){
/*HABER METİNİN İÇİNDE OFFİCE WORLD TİPİ VİRGÜL TEK TIRNAK FİLAN DÜZENTİYOR*/
$text = str_replace(chr(130), ',', $text);
$text = str_replace(chr(132), '"', $text);
$text = str_replace(chr(133), '...',$text);
$text = str_replace(chr(145), "'", $text);
$text = str_replace(chr(146), "'", $text);
$text = str_replace(chr(147), '"', $text);
$text = str_replace(chr(148), '"', $text);
$text = mb_convert_encoding($text, 'HTML-ENTITIES', 'UTF-8');
$text = str_replace('Ğ', 'Ğ', $text);
$text = str_replace('ğ', 'ğ', $text);
$text = str_replace('Ö', 'Ö', $text);
$text = str_replace('ö', 'ö', $text);
$text = str_replace('Ç', 'Ç', $text);
$text = str_replace('ç', 'ç', $text);
$text = str_replace('Ş', 'Ş', $text);
$text = str_replace('ş', 'ş', $text);
$text = str_replace('İ', 'İ', $text);
$text = str_replace('ı', 'ı', $text);
$text = str_replace('Ü', 'Ü', $text);
$text = str_replace('ü', 'ü', $text);
$text = str_replace('"', '"', $text);
return $text;
}