-
Notifications
You must be signed in to change notification settings - Fork 5
/
ornek.php
31 lines (27 loc) · 979 Bytes
/
ornek.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* File: ornek.php
* @author H.Alper Tuna <[email protected]>
* Date: 15.07.2017
* Last Modified Date: 15.07.2017
* Last Modified By: H.Alper Tuna <[email protected]>
*/
require 'Kpsv2Sorgulayici.php';
$adresSorgu = 'https://kpsv2.nvi.gov.tr/Services/RoutingService.svc';
$adresSts = 'https://kimlikdogrulama.nvi.gov.tr/Services/Issuer.svc/IWSTrust13';
$kullanici = 'kullanici';
$sifre = '*******';
$kps = new Kpsv2Sorgulayici($adresSorgu, $adresSts, $kullanici, $sifre);
$metod = 'http://kps.nvi.gov.tr/2011/01/01/BilesikKutukSorgulaKimlikNoServis/Sorgula';
$tcno = 12345678901;
$xmlGovde = <<<XML
<Sorgula xmlns="http://kps.nvi.gov.tr/2011/01/01" xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/">
<kriterListesi>
<BilesikKutukSorgulaKimlikNoSorguKriteri>
<KimlikNo>$tcno</KimlikNo>
</BilesikKutukSorgulaKimlikNoSorguKriteri>
</kriterListesi>
</Sorgula>
XML;
$sonuc = $kps->calistir($metod, $xmlGovde);
print_r($sonuc);