首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >注册到第三方网站的脚本

注册到第三方网站的脚本
EN

Stack Overflow用户
提问于 2015-04-11 14:26:12
回答 1查看 321关注 0票数 1

我的工作的一部分是在第三方游戏网站上注册几个新用户。

我希望在不打开浏览器的情况下重做脚本,但我不确定该使用什么,php with curl,JavaScript?

有没有什么好的建议和推荐信?我需要一些轻快的东西。任何帮助都是非常感谢的。

EN

Stack Overflow用户

发布于 2015-04-11 16:33:08

我最近发表了一篇关于WinHttpRequest COM的文章,并解释了如何使用它进行登录:How to do logins using the WinHttpRequest COM?

如果您对目标站点进行了一点反向工程,则可以更改提供的代码,以便将注册所需的数据发送到服务器。

它可能看起来有点像这样:

代码语言:javascript
运行
复制
;Prepare our WinHttpRequest object
HttpObj := ComObjCreate("WinHttp.WinHttpRequest.5.1")
;HttpObj.SetProxy(2,"localhost:8888") ;Send data through Fiddler (for debugging)
HttpObj.SetTimeouts(6000,6000,6000,6000) ;Set timeouts to 6 seconds
;HttpObj.Option(6) := False ;disable location-header rediects

;Set our URLs
registrationURL := "http://yoursite/registerOrWhatever/"

;Set our registration data
username := "Samah"
email := "myEmail@foo.bar"
password := "mySecretPassword"
acceptTOS := 1
receiveNewsLetter := 0

registrationBody := "username=" username "&email=" email "&repeatEmail=" email "&password=" password "&repeatPassword=" password "&TOSagree=" acceptTOS "&weeklyNewsLetter=" receiveNewsLetter

HttpObj.Open("POST",registrationURL)
HttpObj.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
HttpObj.Send(registrationBody)

If (HttpObj.status == 200 && InStr(HttpObj.ResponseText,"You will shortly receive an email with an activation link."))
    MsgBox, User successfully registered.
Else
    MsgBox, The registration failed!
票数 1
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29574855

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档