找回密码
 加入
搜索
查看: 1912|回复: 1

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

[复制链接]
发表于 2017-12-11 15:42:09 | 显示全部楼层 |阅读模式
本帖最后由 heroxianf 于 2017-12-12 15:08 编辑
http://localhost/jdwork/add.php?user=root&pwd=123
想用GET或者POST发送user和pwd的数据,大家帮帮忙~
发表于 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金钱 +20 收起 理由
heroxianf + 20 谢谢了

查看全部评分

您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-19 09:59 , Processed in 0.079836 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表