Jump to content

winhttp request how to read on website


juniq
 Share

Recommended Posts

hello I'm a total noob in webprogramming and I found a code snippet which seems to post to a website it looks like this:

 

Func Post($data)
    $sPD = $data

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")

$oHTTP.Open("POST", "www.myserver.com/log", False)

$oHTTP.Send($sPD)
EndFunc

so what can I do to receive data or display it in a html page? or is it server side communication and I need to put a "log.php"  file there? cz in the snippet it's "/log" and not "log.php" so what shall I write in the html script to receive or display this data sent by the autoit script? I know it's more like a webprogramming question but I hope somebody will help me anyways PLEASE

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum, as the DEV forum very clearly states:

Quote

Do not create AutoIt-related topics here, use AutoIt General Help and Support

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

hello I'm a total noob in webprogramming and I found a code snippet which seems to post to a website it looks like this:

 

Func Post($data)
    $sPD = $data

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")

$oHTTP.Open("POST", "www.myserver.com/log", False)

$oHTTP.Send($sPD)
EndFunc

so what can I do to receive data or display it in a html page? or is it server side communication and I need to put a "log.php"  file there? cz in the snippet it's "/log" and not "log.php" so what shall I write in the html script to receive or display this data sent by the autoit script? I know it's more like a webprogramming question but I hope somebody will help me anyways PLEASE

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...