获取微信公众号阅读数

static function OnBeforeResponse(oSession: Session) {
        if (m_Hide304s && oSession.responseCode == 304) {
            oSession["ui-hide"] = "true";
        }
    //加在方法末尾
    if (oSession.HostnameIs("mp.weixin.qq.com") && oSession.uriContains("https://mp.weixin.qq.com/mp/getappmsgext")){  
        var filename = "d:\\fiddler-token.log";  
        var curDate = new Date();  
        var logContent =  "[" + curDate.toLocaleString() + "] " + oSession.PathAndQuery + "\r\n"+oSession.GetResponseBodyAsString()+"\r\n";  
        var sw : System.IO.StreamWriter;  
        if (System.IO.File.Exists(filename)){  
            sw = System.IO.File.AppendText(filename);  
            sw.Write(logContent);  
        }  
        else{  
            sw = System.IO.File.CreateText(filename);  
            sw.Write(logContent);  
        }  
        sw.Close();  
        sw.Dispose();  
            //提交到服务端
            var method:String = 'POST';
            var url:String = 'http://192.168.1.112:88/admin/addread';
            var protocol = "HTTP/1.1";
            var raw = method + " " + url + " " + protocol + "\r\n";
            raw += "Content-Type: application/x-www-form-urlencoded\r\n"
            var body = 'dat=' + oSession.GetResponseBodyAsString() + "&signature=" + oSession.RequestHeaders['XXXX'];
            raw += "content-length: " + body.toString().length + "\r\n";
            raw += "\r\n" + body;
            FiddlerObject.utilIssueRequest(raw);
            
            
        
    }
      
        
        
    }
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值