Example #1
0
 /**
  * State confirmation of the Turkish Identity Number
  *
  * Soap Client for checking the Turkish Identity Number communicating with the Turkish Identification identity.
  * All of string parameters has to include exact turkish characters, otherwise it returns false.
  *
  * @param string $name Name on Identity card, has to include the middle name
  * @param string $surname Name on Identity card.
  * @param int $birthYear Birth year on Identity Card
  * @return bool
  */
 public function askToState($name, $surname, $birthYear)
 {
     if (!$this->validate()) {
         return false;
     }
     $client = new SoapClient('https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL');
     $result = $client->TcKimlikNoDogrula(array('TCKimlikNo' => $this->tcIdentificationNo, 'Ad' => $this->strtoupperTR($name), 'Soyad' => $this->strtoupperTR($surname), 'DogumYili' => $birthYear));
     return $result->TCKimlikNoDogrulaResult;
 }