Jump to content

Website POST data question


Recommended Posts

Hi All

I'm new to this, I have the following code it does POST the data 'silently' however, I'm wondering what I need to also have the code open the URL in a browser window & POST the data? Any help really appreciated, thanks

$sPD2 = 'email=' & $sEmail & '&pc_guid=' & $sUniqueID
$oHTTP2 = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP2.Open("POST", "https://MyURL/MyPhpScript.php", False)
$oHTTP2.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")

; Performing the Request
$oHTTP2.Send($sPD2)
; Download the body response if any, and get the server status response code.
$oReceived2 = $oHTTP2.ResponseText
$oStatusCode2 = $oHTTP2.Status
;MsgBox(0,"",$oStatusCode & "  " & $oReceived)
If $oStatusCode2 <> 200 Then
    MsgBox(4096, "Internet", "Experienced problem with internet", 3);tempmsg
Else
    MsgBox(0,"","Sent POST data = " & $sPD2)
EndIf
Edited by VenusProject2
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...