lionel Posted April 30, 2012 Posted April 30, 2012 (edited) Hello, I want convert this code PHP for AutoIt <?php $request = fsockopen('ssl://simple-note.appspot.com', 443); if ($request) { echo 'connectOK<br />'; } $headers_string = "POST /api/login HTTP/1.0rnHost: simple-note.appspot.comrnContent-type: application/x-www-form-urlencodedrnContent-length: 68rnConnection: ClosernrnZW1haWw9c2ltcGxlbm90ZSU0MGhvdG1haWwuZnImcGFzc3dvcmQ9bW90ZGVwYXNzZQ=="; fwrite($request, $headers_string); $response=''; while (!feof($request)) { $response .= fgets($request, 1024); } echo $response; ?> I create this #include <WinHttp.au3> Global $sDomain = "simple-note.appspot.com" Global $sPage = "api/login" $headers_string = "POST /api/login HTTP/1.0"&@CRLF&"Host: simple-note.appspot.com"&@CRLF&"Content-type: application/x-www-form-urlencoded"&@CRLF&"Content-length: 68"&@CRLF&"Connection: Close"&@CRLF&@CRLF&"ZW1haWw9c2ltcGxlbm90ZSU0MGhvdG1haWwuZnImcGFzc3dvcmQ9bW90ZGVwYXNzZQ==" Global $hOpen = _WinHttpOpen() ; Get connection handle Global $hConnect = _WinHttpConnect($hOpen, $sDomain) if @error Then MsgBox(16, "", 1) $sData = "ZW1haWw9c2ltcGxlbm90ZSU0MGhvdG1haWwuZnImcGFzc3dvcmQ9bW90ZGVwYXNzZ==" $hRequestSSL = _WinHttpSimpleSSLRequest($hConnect, "POST", $sPage, $sData) if @error Then MsgBox(16, "", 2&@CRLF&@error) MsgBox(0, "", $hRequestSSL) but it does not work... Please Help me Edited April 30, 2012 by lionel
Bert Posted April 30, 2012 Posted April 30, 2012 Is this for an auto-logon to a website? If yes then you should review the forum rules. If not, then could you explain what you want to do with this script? The Vollatran project My blog: http://www.vollysinterestingshit.com/
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