heroxianf 发表于 2017-12-11 15:42:09

[已解决]请教一个AU3 GET或者POST发送数据

本帖最后由 heroxianf 于 2017-12-12 15:08 编辑

http://localhost/jdwork/add.php?user=root&pwd=123想用GET或者POST发送user和pwd的数据,大家帮帮忙~

ila 发表于 2017-12-11 20:46:59

Dim $postdata="username_value=admin&password_value=0081"
Global $login_url="http://192.168.1.60/generalconfig5.htm"
Global $url="http://192.168.1.60/restart_exec.htm"

Global $oHTTP= ObjCreate("WinHttp.WinHttpRequest.5.1")
;$oHTTP.SetProxy('2',"http://192.168.3.149:8848","")
$oHTTP.Open("POST",$login_url,False)
$oHTTP.setRequestHeader('Content-Type','application/x-www-form-urlencoded')
$oHTTP.setRequestHeader("User-Agent","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko")
;_WinHttpAddRequestHeaders($request1,"")
$oHTTP.Send($postdata)

$oHTTP.Open("GET",$url)
$oHTTP.setRequestHeader("User-Agent","Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko")
$oHTTP.Send()
ConsoleWrite($oHTTP.ResponseText)发一个我之前重启固网打印服务器的脚本,
页: [1]
查看完整版本: [已解决]请教一个AU3 GET或者POST发送数据