VBScript Example

From CDYNE Wiki
Jump to: navigation, search

Check Phone Number

Dim request, oXMLHttp, url
url = "http://ws.cdyne.com/phoneverify/phoneverify.asmx"
 
request = "<?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>" & _
"<CheckPhoneNumber xmlns=""http://ws.cdyne.com/PhoneVerify/query"">" & _
"<PhoneNumber>17575449510</PhoneNumber>" & _
"<LicenseKey>YOUR LICENSE KEY</LicenseKey>" & _
"</CheckPhoneNumber>" & _
"</soap:Body>" & _
"</soap:Envelope>"
 
Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
oXMLHttp.open "POST", url, False
oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
oXMLHttp.send request
response = oXMLHttp.responseText
 
MsgBox oXMLHttp.responseText

Check Phone Numbers

Dim request, oXMLHttp, url
url = "http://ws.cdyne.com/phoneverify/phoneverify.asmx"
 
request = "<?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>" & _
"<CheckPhoneNumbers xmlns=""http://ws.cdyne.com/PhoneVerify/query"">" & _
"<PhoneNumbers>" & _
"<string >17575449510</string>" & _
"<string>18009843710</string>" & _
"</PhoneNumbers>" & _
"<LicenseKey>YOUR LICENSE KEY</LicenseKey>" & _
"</CheckPhoneNumbers>" & _
"</soap:Body>" & _
"</soap:Envelope>"
 
Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
oXMLHttp.open "POST", url, False
oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
oXMLHttp.send request
response = oXMLHttp.responseText
 
MsgBox oXMLHttp.responseText
Personal tools
Namespaces

Variants
Actions
Navigation
Tools

Trial Key