No announcement yet.

Login Script VBS http request question

  • Filter
  • Time
  • Show
Clear All
new posts

  • Login Script VBS http request question

    Hi Everyone,

    I need to create a Login VBS script that will some how "run" the URL below, but so that it is behind the scenes and the user does not see a web browser open then cleans itself up and closes everything upon completion. Is this possible?


    The end result should be something like:

    the user logs in, vbs script runs, calls that URL somehow and the page does its thing, login script ends


  • #2
    Re: Login Script VBS http request question

    What do you expect the web page to do? Are the parameters user's first and last names?

    Are you just interested in making an HTTP request in order to do some activity logging? Or would you like the web page to execute some ActiveX component? Something else?

    Anyway, the simple way to make a HTTP request is to use MSXML2, just like an Ajax call would. Like so,

    Set objAjax = CreateObject("MSXML2.XMLHTTP") "GET", "", False
    if(200 = objAjax.Status) then 
      ' Hooray for success
      ' Oh noes! Internets are borked!
    end if


    • #3
      Re: Login Script VBS http request question

      Thanks for responding vonPryz. Basically the web page is just getting the data from the URL and inserting it into a database. I guess I could do this via a Post instead of a Get function.

      do I need to do something on the webpage side to send a status back to the script to finish or something?


      • #4
        Re: Login Script VBS http request question

        You are building some kind of activity logger, aren't you?

        For the Ajax call, it doesn't make really any difference whether you want to GET or POST. You need to take care about different verbs on the Php page. In addition, a post request fields are populated a bit differently than get.

        Handling status code depends if you want to implement error checking or the like. Consider what the system would do in case the web server is down during logon.