打印

[NET精华教程] .net教程:精品:asp3.0中email有效性验证

.net教程:精品:asp3.0中email有效性验证

dim email
dim status
dim emaildata
dim licensekey

licensekey = 0
if request.form.count > 0 then
        email = request.form("email")
   
          dim oxmlhttp      
      
      set oxmlhttp = server.createobject("msxml2.serverxmlhttp")

      oxmlhttp.open "post", _
                    "http://ws.cdyne.com/emailverify/ev.asmx/verifyemail", _
                    false
      oxmlhttp.setrequestheader "content-type", _
                                "application/x-www-form-urlencoded"
      oxmlhttp.send "email=" & server.urlencode(email) & "&licensekey=" & server.urlencode(licensekey)
      response.write oxmlhttp.status
      if oxmlhttp.status = 200 then
          dim odom
          set odom = oxmlhttp.responsexml
          dim onl
          dim ocn
          dim occ
          set onl = odom.getelementsbytagname("returnindicator")
          for each ocn in onl
            for each occ in ocn.childnodes
                select case lcase(occ.nodename)

                    case "responsetext"

                        emaildata = emaildata & "codetxt: " & occ.text & "<br>"
                    case "responsecode"
                        emaildata = emaildata & "code: " & occ.text & "<br>"
                end select
            next
          next
          if status = "" then status = "ok"

          set occ = nothing
          set ocn = nothing
          set onl = nothing
          set odom = nothing
         
         
         
      
      else
        status = "service unavailable. try again later"
      end if
      set oxmlhttp = nothing
   
e





TOP

返回顶部
AYBlue

Processed in 0.054424 second(s), 7 queries.

当前时区 GMT+8, 现在时间是 2009-1-8 15:43 京ICP备06054220号

清除 Cookies - 联系我们 - 163K.com - Archiver - WAP