botanic Posted November 26, 2013 Share Posted November 26, 2013 I am trying to post some http data I have the below code however it doesnt seem to work I get the response from the server however the $_POST is not being sent to the server. I am trying to pass the value name=Desktop Case $savedir Local $hOpen = _WinHttpOpen() Local $hConnect = _WinHttpConnect($hOpen, "http://$url/post.php") ; Specify the reguest: Local $hRequest = _WinHttpOpenRequest($hConnect, "POST", 'post.php', '', '"name=Desktop"' ) ; Send request _WinHttpSendRequest($hRequest) ; Wait for the response _WinHttpReceiveResponse($hRequest) Local $sHeader = _WinHttpReadData($hRequest) ; ...get full header ; Clean _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) MsgBox(0, "Header", $sHeader) Thank you Link to comment Share on other sites More sharing options...
JohnOne Posted November 26, 2013 Share Posted November 26, 2013 Is "$url" really the address or is it supposed to be a variable? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
botanic Posted November 26, 2013 Author Share Posted November 26, 2013 its a real address i just removed the actual ip from the script Link to comment Share on other sites More sharing options...
trancexx Posted November 27, 2013 Share Posted November 27, 2013 (edited) Probably should be something like this:Local $hConnect = _WinHttpConnect($hOpen, "http://$url") ; Specify the reguest: Local $hRequest = _WinHttpOpenRequest($hConnect, "POST", "post.php") ; Send request _WinHttpSendRequest($hRequest, Default, "name=Desktop") ;... Edited November 27, 2013 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now