Results 1 to 2 of 2

Thread: Very basic

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Oporto, Portugal
    Posts
    134

    Angry Very basic

    Hi. I have this very basic question. I´ve never used an ASP command in my life so....
    I'm already connected to the internet.

    As I imagine I have an ASP exe in a server that if I sen a command like the one that follows:

    --CODE--
    var mobj = new ActiveXObject("Microsoft.XMLHTTP")
    var xmlDom = new ActiveXObject("Microsoft.XMLDOM")

    mobj.open ("POST", "serverNameortNumber/SMSForum/getXML.asp?forum_id=1&username=aaa&password=bbb" ,false)
    mobj.setRequestHeader ("Content-Type","text/xml")
    mobj.setRequestHeader("Cache-Control","no-cache")

    mobj.send ("<send>empty</send>")

    xmlDom.async = false
    xmlDom.loadXML(mobj.responseXML.xml)
    if (xmlDom.parseError == 0){
    // access to the object XMLDOM permited
    }
    --END CODE--

    How can I convert this into a function in VBasic ??

    Sorry for the basic question but I only programm in VB for front-end to video-graphics programs.

    Sorry once again.
    Jorge Ledo
    [email protected]
    Portugal were the sun allways shine... for programmers.

  2. #2
    WALDO
    Guest

    It's surprisingly similar

    VB Code:
    1. <%
    2. Dim mobj
    3. Dim xmlDom
    4.  
    5. Set mobj = Server.CreateObject("Microsoft.XMLHTTP")
    6. Set xmlDom = Server.CreateObject("Microsoft.XMLDOM")
    7.  
    8. mobj.open ("POST", "serverName:PortNumber/SMSForum/getXML.asp?forum_id=1&username=aaa&password=bbb" ,false)
    9. mobj.setRequestHeader ("Content-Type","text/xml")
    10. mobj.setRequestHeader("Cache-Control","no-cache")
    11.  
    12. mobj.send ("<send>empty</send>")
    13.  
    14. xmlDom.async = False
    15. xmlDom.loadXML(mobj.responseXML.xml)
    16. If (xmlDom.parseError = 0) Then
    17. ' access to the object XMLDOM permited
    18. Else
    19. 'You have been screwed
    20. End If
    21. %>
    Big difference...NOT!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width