Tayfun | | Tarih: 10.12.2006, 01:16 Mesaj konusu: TC Kimlik Doğrulama (ASP) | |
| <%
dim tckimlikno
tckimlikno = 11111111111 // kimlik numaramızı buraya yazıyoruz
function xmlwebservices(byval kimlikno)
dim soap
soap = "<?xml version=""1.0"" encoding=""utf-8""?>"&_
"<soap:envelope xmlns:xsi=""http://www.w3.org/2001/xmlschema-instance"" xmlns:xsd=""http://www.w3.org/2001/xmlschema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"&_
"<soap:body>"&_
"<tckimliknodogrula xmlns=""http://kps.nvi.gov.tr/ws/public"">"&_
"<tckimlikno>"& kimlikno &"</tckimlikno>"&_
"</tckimliknodogrula>"&_
"</soap:body>"&_
"</soap:envelope>"
set objwebservices = server.createobject("msxml2.serverxmlhttp")
objwebservices.open "post", "http://tckimlik.nvi.gov.tr/kpspublic.asmx", false
objwebservices.setrequestheader "content-type", "text/xml; charset=utf-8"
objwebservices.setrequestheader "soapaction", "http://kps.nvi.gov.tr/ws/public/tckimliknodogrula"
objwebservices.send(soap)
dim text
ıf objwebservices.readystate = 4 then
ıf objwebservices.status = 200 then
text = objwebservices.responsetext
end ıf
end ıf
set objwebservices = nothing
xmlwebservices = text
end function
dim sonuc
sonuc = trim(xmlwebservices(tckimlikno))
ıf (len(sonuc) <> 0) then
set objxml = server.createobject("microsoft.xmldom")
objxml.async = false
objxml.loadxml(sonuc)
set objnode = objxml.selectsinglenode("soap:envelope/soap:body/tckimliknodogrularesponse/tckimliknodogrularesult")
response.write "<b>ısim :</b> "& objnode.childnodes.item(1).text &"<br />"& vbcrlf
response.write "<b>soyad :</b> "& objnode.childnodes.item(2).text &"<br />"& vbcrlf
response.write "<b>doğum tarihi :</b> "& objnode.childnodes.item(3).text &"<br />"& vbcrlf
set objnode = nothing
set objxml = nothing
else
response.write "girdiğiniz bilgi doğrulanamadı!"
end ıf
%>
|
|