ImageVerifierCode 换一换
格式:DOCX , 页数:5 ,大小:16.57KB ,
资源ID:16795223      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/16795223.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(扫微信二维码广告语Word格式.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

扫微信二维码广告语Word格式.docx

1、public function _construct($options) $this-_account = isset($options)?$options:; $this-_datapath =isset($options)?$this-_datapath;debug = isset($options)?false;_logcallback =_cookiename = $this-_datapath.$this-_account;getCookie($this-_cookiename); /* 把cookie写入缓存* param string $filename 缓存文件名 * para

2、m string $content 文件内容 * return bool */public function saveCookie($filename,$content) return file_put_contents($filename,$content);* 读取cookie缓存内容* param string $filename 缓存文件名 * return string cookie */public function getCookie($filename) if (file_exists($filename) $mtime = filemtime($filename);if ($

3、mtime_cookieexpired) return false; $data = file_get_contents($filename); if ($data) $this-cookie = $data; return $this-cookie; /* 删除cookie */public function deleteCookie($filename) $this-cookie = ; unlink($filename); return true;private function log($log)if ($this-debug & function_exists($this-_logc

4、allback) if (is_array($log) $log = print_r($log,true); return call_user_func($this-_logcallback,$log);/* 获取登陆二维码对应的授权码 */public function get_login_code()_logincode) return $this-_logincode; $t = time().strval(mt_rand(100,999); $codeurl =https:/jslogin?appid=wx782c26e4c19acffb&redirect_uri=https%3A%2

5、F%2Fcgi-bin%2Fmmwebwx-bin%2Fwebwxnewloginpage&fun=new&lang=zh_CN&_=.$t; $send_snoopy = new Snoopy; $send_snoopy-fetch($codeurl); $result = $send_snoopy-results; if ($result) preg_match(_logincode = $matches; $_SESSION = 0; return $this- return $result;* 通过授权码获取对应的二维码图片地址 * param string $code * retur

6、n string image url */public function get_code_image($code=)if ($code=) $code = $this- if (!$code) return false;return http:/qrcode/.$this-_logincode.?t=webwx;* 设置二维码对应的授权码 * param string $code * return class $this */public function set_login_code($code) $this-_logincode = $code; return $this;* 二维码登陆

7、验证 * return status:* =400: invaild code; 408: not auth and wait, 400,401: not valid or expired * 201: just scaned but not confirm * 200: confirm then you can get user info */public function verify_code() if (!_logincode) return false; $url =/cgi-bin/mmwebwx-bin/login?uuid=.$this-_logincode.&tip=1&$s

8、end_snoopy = new Snoopy;$send_snoopy-referer = $status = intval($matches);if ($status=201) $_SESSION = 1; if ($status=200) log(step2:.print_r($matches,true); if (count($matches)1) $ticket = $matches; $scan = $matches; $loginurl =/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=.$ticket.&scan=.$scan.&fu

9、n=new; $send_snoopy-referer =fetch($loginurl); $this-log(step3:.print_r($send_snoopy-headers,true);foreach ($send_snoopy-headers as $key = $value) $value = trim($value); if(strpos($value,Set-Cookie: ) != false)$tmp = str_replace($cookie.=$tmp; $cookie .=return $status; return false;* 获取登陆的cookie * p

10、aram bool $is_array 是否以数值方式返回,默认否,返回字符串 * return string|array */public function get_login_cookie($is_array = false) if (!$is_array)return $this- $c_arr = explode(;,$this-cookie); $cookie = array();foreach($c_arr as $item) $kitem = explode(=,trim($item); if (count($kitem)1) $key = trim($kitem); $val

11、= trim($kitem);empty($val) $cookie = $val;return $cookie;* 授权登陆后获取用户登陆信息 */public function get_login_info()cookie) return false;$submit = https:/cgi-bin/mmwebwx-bin/webwxinit?r=.$t;rawheaders= $this-log(login_info:.$send_snoopy-results);results,true); if ($result_login_user = $result; return $result

12、;* 获取头像* param string $url 传入从用户信息接口获取到的头像地址 */public function get_avatar($url) if (! if (strpos($url, http)=false) $url = http:/$url;$result = $send_snoopy- if ($result) elsereturn false;* 登出当前登陆用户 */public function logout()/cgi-bin/mmwebwx-bin/webwxlogout?redirect=1&type=1;submit($submit,array(uin=$uid,sid=$sid);deleteCookie($this-

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1