|
Post by Michociech on Mar 20, 2014 9:49:36 GMT -5
Hello
In RunBasic program i have: ans$=HTTPPOST$("http://some.adress/test.php", "t=ttt") print ans$
In test.php is: <?php print_r($_POST); ?>
I trying to send: ?t=ttt "t=ttt" "?t=ttt" t="ttt" ?t="ttt" ttt "ttt"
and always answer is: Array ( )
loking that nothing was send to test.php
When I using script: open "aaaa.vbs" for output as #vbs print #vbs, "strPostData = "; chr$(34); "t=ttt"; chr$(34) print #vbs, "With CreateObject("; chr$(34); "MSXML2.XMLHTTP"; chr$(34); ")" print #vbs, " .open "; chr$(34); "POST"; chr$(34); ", "; chr$(34); "http://some.adress/test.php"; chr$(34); ", False" print #vbs, " .setRequestHeader "; chr$(34); "Content-Type"; chr$(34); ", "; chr$(34); "application/x-www-form-urlencoded"; chr$(34) print #vbs, " .send (strPostData)" print #vbs, " a = .ResponseBody" print #vbs, "End With" print #vbs, "With CreateObject("; chr$(34); "ADODB.Stream"; chr$(34); ")" print #vbs, " .Type = 1" print #vbs, " .Mode = 3" print #vbs, " .Open" print #vbs, " .Write a" print #vbs, " .SaveToFile "; chr$(34); "ans.txt"; chr$(34); ", 2" print #vbs, " .Close" print #vbs, "End With" close #vbs vbs$ = "cscript.exe aaaa.vbs " run vbs$, hide
this working good
PS. Of course "http://some.adress/test.php" is not real adress.
-- Best regards Michociech
|
|
neal
Full Member
 
Posts: 104
|
Post by neal on Mar 20, 2014 19:46:00 GMT -5
httppost$() is not working for me - same results as you got (ie. connects to the web page but doesn't seem to send any data)
|
|