前一阵子微信跳一跳非常火爆,身边不少朋友都在玩儿,不过最高分数也才600多分,比起网上大神们各种外挂程序随随便便就能刷个上千分来说,根本不够看。作为一名普通个人站长,互联网上任何风吹草动都要知道,了解用户需求才是引流之道。在朋友要求之下,我玩儿了几十次,最高几十分,简直没脸见人了。于是找到下面这款神器,直冲榜首。
核心源码:
复制
private string HttpPost(string Url, string postDataStr) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url); request.Method = "POST"; request.Accept = "gzip"; //request.Connection = "Keep-Alive"; request.ContentType = "application/json"; request.UserAgent = "User-Agent:MicroMessenger/6.6.1.1220(0x26060133) NetType/WIFI Language/zh_CN"; request.Referer = "https://servicewechat.com/wx7c8d593b2c3a7703/5/page-frame.html"; request.ContentLength = Encoding.UTF8.GetByteCount(postDataStr); // request.CookieContainer = ""; Stream myRequestStream = request.GetRequestStream(); StreamWriter myStreamWriter = new StreamWriter(myRequestStream, Encoding.GetEncoding("gb2312")); myStreamWriter.Write(postDataStr); myStreamWriter.Close(); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); //response.Cookies = cookie.GetCookies(response.ResponseUri); Stream myResponseStream = response.GetResponseStream(); StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8")); string retString = myStreamReader.ReadToEnd(); myStreamReader.Close(); myResponseStream.Close(); return retString; }
只需要使用post向小程序服务器提交分数即可,当然,这个过程免不了加密解密,全部源码放在文章末尾了,需要的朋友可以试试。
评论 (0)