Heim php教程 php手册 PHP获取QQ邮箱好友的具体代码讲解

PHP获取QQ邮箱好友的具体代码讲解

Jun 13, 2016 am 11:05 AM
php 代码 使用 spezifisch Freunde von derzeit 获取 讲解 软件 邮箱

目前,大家都在使用QQ,并且还将QQ附带的一些其他软件当做自己的日常使用工具。今天我们就向大家介绍有关如何运用具体的PHP获取QQ邮箱好友的代码如下:

<ol class="dp-xml">
<li class="alt"><span><strong><font color="#006699"><span class="tag"></span><span class="tag-name">php</span></font></strong><span> </span></span></li>
<li class=""><span>/**   </span></li>
<li class="alt"><span>* @file class.qqhttp.php  </span></li>
<li class=""><span>* qq邮箱登陆获取类  </span></li>
<li class="alt">
<span>* @author wc</span><strong><font color="#006699"><span class="tag"><span class="tag-name">cao8222</span></span></font></strong><span>@gmail.com</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> </span>
</li>
<li class=""><span>* @date 2009-04-27  </span></li>
<li class="alt"><span> */  </span></li>
<li class=""><span> </span></li>
<li class="alt"><span>class QQHttp {  </span></li>
<li class=""><span> </span></li>
<li class="alt">
<span>    var $</span><span class="attribute"><font color="#ff0000">cookie</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">''</font></span><span>;  </span>
</li>
<li class=""><span> </span></li>
<li class="alt"><span>    function __cunstrut() {  </span></li>
<li class=""><span>    }  </span></li>
<li class="alt"><span> </span></li>
<li class=""><span>    function makeForm() {  </span></li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">form</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">array</font></span><span>(  </span>
</li>
<li class="">
<span>            'url' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> "http://mail.qq.com/cgi-bin/loginpage",  </span>
</li>
<li class="alt"><span>        );  </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">data</font></span><span> = $this-</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>curlFunc($form);  </span>
</li>
<li class="alt">
<span>        preg_match('/</span><span class="attribute"><font color="#ff0000">name</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">"ts"</font></span><span></span><span class="attribute"><font color="#ff0000">svalue</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">"(d+)"</font></span><span>/',$data['html'], $tspre);  </span>
</li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">ts</font></span><span> = $tspre[1];  </span>
</li>
<li class="alt">
<span>        preg_match('/</span><span class="attribute"><font color="#ff0000">action</font></span><span>="http://(md+).mail.qq.com/',$data['html'], $server);  </span>
</li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">server_no</font></span><span> = $server[1];  </span>
</li>
<li class="alt"><span> </span></li>
<li class=""><span>        /*  login.html 载入 */  </span></li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">html</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">file_get_contents</font></span><span>(dirname(__FILE__).'/login.htm');  </span>
</li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">html</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">str_replace</font></span><span>('{_ts_}',$ts, $html);  </span>
</li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">html</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">str_replace</font></span><span>('{_server_no_}',$server_no, $html);  </span>
</li>
<li class=""><span>        return $html;  </span></li>
<li class="alt"><span>    }  </span></li>
<li class=""><span> </span></li>
<li class="alt"><span>    function curlFunc($array)  </span></li>
<li class=""><span>    {  </span></li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">ch</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">curl_init</font></span><span>();  </span>
</li>
<li class=""><span>        curl_setopt($ch, CURLOPT_URL, $array['url']);  </span></li>
<li class="alt"><span>        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  </span></li>
<li class=""><span>        if( isset($array['header']) && $array['header'] ) {  </span></li>
<li class="alt"><span>            curl_setopt($ch, CURLOPT_HEADER, 1);  </span></li>
<li class=""><span>        }  </span></li>
<li class="alt"><span>        if(isset($array['httpheader'])) {  </span></li>
<li class=""><span>            curl_setopt($ch, CURLOPT_HTTPHEADER, $array['httpheader']);  </span></li>
<li class="alt"><span>        }  </span></li>
<li class=""><span>        if(isset($array['referer'])) {  </span></li>
<li class="alt"><span>            curl_setopt($ch, CURLOPT_REFERER, $array['referer']);  </span></li>
<li class=""><span>        }  </span></li>
<li class="alt"><span>        if( isset($array['post']) ) {  </span></li>
<li class=""><span>            curl_setopt($ch, CURLOPT_POST, 1 );  </span></li>
<li class="alt"><span>            curl_setopt($ch, CURLOPT_POSTFIELDS, $array['post']);  </span></li>
<li class=""><span>        }  </span></li>
<li class="alt"><span>        if( isset($array['cookie']) ){  </span></li>
<li class=""><span>            curl_setopt($ch, CURLOPT_COOKIE, $array['cookie']);  </span></li>
<li class="alt"><span>        }  </span></li>
<li class=""><span>        $r['erro'] = curl_error($ch);  </span></li>
<li class="alt"><span>        $r['errno'] = curl_errno($ch);  </span></li>
<li class=""><span>        $r['html'] = curl_exec($ch);  </span></li>
<li class="alt"><span>        $r['http_code'] = curl_getinfo($ch, CURLINFO_HTTP_CODE);  </span></li>
<li class=""><span>        curl_close($ch);  </span></li>
<li class="alt"><span>        return $r;  </span></li>
<li class=""><span>    }  </span></li>
<li class="alt"><span> </span></li>
<li class=""><span>    /**   </span></li>
<li class="alt"><span>     * 获取验证码图片和cookie  </span></li>
<li class=""><span>     * @param Null  </span></li>
<li class="alt"><span>     *   </span></li>
<li class="">
<span>     * @return array('img'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>String, 'cookie'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>String)  </span>
</li>
<li class="alt"><span>     */  </span></li>
<li class=""><span>    function getVFCode ()   </span></li>
<li class="alt"><span>    {  </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">vfcode</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">array</font></span><span>(  </span>
</li>
<li class="alt">
<span>            'header' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> true,  </span>
</li>
<li class="">
<span>            'cookie' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> false,  </span>
</li>
<li class="alt">
<span>            'url'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>'http://ptlogin2.qq.com/getimage?</span><span class="attribute"><font color="#ff0000">aid</font></span><span>='.$_GET['aid</span><span class="attribute-value"><font color="#0000ff">'].'</font></span><span>&'.@$_GET['t'],  </span>
</li>
<li class=""><span>        );  </span></li>
<li class="alt"><span> </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">r</font></span><span> = $this-</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>curlFunc($vfcode);  </span>
</li>
<li class="alt"><span>        if ($r['http_code'] != 200 ) return false;  </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">data</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">split</font></span><span>("n", $r['html']);  </span>
</li>
<li class="alt">
<span>        preg_match('/</span><span class="attribute"><font color="#ff0000">verifysession</font></span><span>=([^;]+);/',$data[5], $temp);  </span>
</li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">cookie</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">trim</font></span><span>($temp[1]);  </span>
</li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">img</font></span><span> = $data[9];  </span>
</li>
<li class="">
<span>        return  array('img'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>$img,'cookie'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>$cookie);  </span>
</li>
<li class="alt"><span>    }  </span></li>
<li class=""><span> </span></li>
<li class="alt"><span>    /**   </span></li>
<li class=""><span>     * 登陆qq邮箱  </span></li>
<li class="alt"><span>     *   </span></li>
<li class=""><span>     * @param $cookie getvfcode中生成的cookie  </span></li>
<li class="alt"><span>     *   </span></li>
<li class=""><span>     * @return array(  </span></li>
<li class="alt">
<span>     *   </span><span class="attribute"><font color="#ff0000">sid</font></span><span>=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>String , //用户认证的唯一标示  </span>
</li>
<li class="">
<span>     *   </span><span class="attribute"><font color="#ff0000">login</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> Boolean, //true 登陆成功 ,false 登陆失败  </span>
</li>
<li class="alt">
<span>     *   </span><span class="attribute"><font color="#ff0000">server_no</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> String // 服务器编号  </span>
</li>
<li class="">
<span>     *   </span><span class="attribute"><font color="#ff0000">active</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> Boolean //true 已开通 ,false 未开通 邮箱  </span>
</li>
<li class="alt">
<span>     *   </span><span class="attribute"><font color="#ff0000">cookie</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> String // 获取数据cookie  </span>
</li>
<li class=""><span>     *  </span></li>
<li class="alt"><span>     * );  </span></li>
<li class=""><span>     */  </span></li>
<li class="alt"><span>    function login($cookie)   </span></li>
<li class=""><span>    {  </span></li>
<li class="alt"><span>        /* 生成参数字符串 */  </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">post</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">array</font></span><span>();  </span>
</li>
<li class="alt">
<span>        foreach($_POST as $</span><span class="attribute"><font color="#ff0000">k</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> $v) {  </span>
</li>
<li class=""><span>            $post[] = $k.'='.urlencode($v);  </span></li>
<li class="alt"><span>        }  </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">poststr</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">implode</font></span><span>('&',$post);  </span>
</li>
<li class="alt"><span>        $r['server_no'] = $_GET['server_no'];  </span></li>
<li class=""><span> </span></li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">login</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">array</font></span><span>(  </span>
</li>
<li class="">
<span>            'url'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>'http://'.$r['server_no'].'.mail.qq.com/cgi-bin/login?</span><span class="attribute"><font color="#ff0000">sid</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">0</font></span><span>,2,zh_CN',  </span>
</li>
<li class="alt">
<span>            'header' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> true,  </span>
</li>
<li class="">
<span>            'cookie' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> '</span><span class="attribute"><font color="#ff0000">verifysession</font></span><span>='.$cookie,  </span>
</li>
<li class="alt">
<span>            'referer' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> 'http://mail.qq.com/cgi-bin/loginpage',  </span>
</li>
<li class="">
<span>            'httpheader'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>array(  </span>
</li>
<li class="alt"><span>                "Host: " . $r['server_no'] . '.mail.qq.com',  </span></li>
<li class=""><span>                "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9 FirePHP/0.2.4",  </span></li>
<li class="alt"><span>                "Content-Type: application/x-www-form-urlencoded",  </span></li>
<li class=""><span>            ),  </span></li>
<li class="alt">
<span>            'post' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> $poststr ,  </span>
</li>
<li class=""><span>        );  </span></li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">data</font></span><span> = $this-</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>curlFunc($login);  </span>
</li>
<li class=""><span>        $data['html'] = iconv("gb2312", "UTF-8", $data['html']);  </span></li>
<li class="alt"><span>        if ($data['http_code'] != 200) {  </span></li>
<li class="">
<span>            $this-</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>error($data);  </span>
</li>
<li class="alt"><span>            return false;  </span></li>
<li class=""><span>        }  </span></li>
<li class="alt"><span> </span></li>
<li class=""><span>        /* 测试数据 */  </span></li>
<li class="alt"><span>        //$data['html'] =file_get_contents('./r.txt');  </span></li>
<li class=""><span>        $r['uin'] = $_POST['uin'];  </span></li>
<li class="alt"><span>        /* 登陆错误的判断 */  </span></li>
<li class="">
<span>        if (preg_match('|</span><span class="attribute"><font color="#ff0000">errtype</font></span><span>=(d)|', $data['html'], $temp_err)) {  </span>
</li>
<li class="alt"><span>            $r['login'] = false;  </span></li>
<li class=""><span>            if ($temp_err[1] == 1) {  </span></li>
<li class="alt"><span>                $r['msg'] = '账号和密码错误';  </span></li>
<li class=""><span>            } elseif ($temp_err[1] == 2) {  </span></li>
<li class="alt"><span>                $r['msg'] = '验证码错误';  </span></li>
<li class=""><span>            }  </span></li>
<li class="alt"><span>            return $r;  </span></li>
<li class=""><span>        }  </span></li>
<li class="alt"><span>        /* 登陆成功 */  </span></li>
<li class="">
<span>        preg_match('|</span><span class="attribute"><font color="#ff0000">urlHead</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">"([^"</font></span><span>]+)"|i',$data['html'],$temp_url);  </span>
</li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">urlhead</font></span><span> = $temp_url[1];  </span>
</li>
<li class="">
<span>        if (preg_match('|frame_html?</span><span class="attribute"><font color="#ff0000">sid</font></span><span>=([^"]+)"|i',$data['html'],$temp_sid) ) {  </span>
</li>
<li class="alt"><span>            $r['sid'] = $temp_sid[1];  </span></li>
<li class=""><span>            $r['active'] = true;  </span></li>
<li class="alt">
<span>        } elseif (preg_match('|autoactivation?</span><span class="attribute"><font color="#ff0000">sid</font></span><span>=([^&]+)?&|i',$data['html'],$temp_sid) ) {  </span>
</li>
<li class=""><span>            $r['sid'] = $temp_sid[1];  </span></li>
<li class="alt"><span>            $r['active'] = false;  </span></li>
<li class=""><span>        }  </span></li>
<li class="alt"><span>        /* 登录后cookie的获取 ,在后续操作中用到 */  </span></li>
<li class=""><span>        if (preg_match_all('|Set-Cookie:([^=]+=[^;]+)|i', $data['html'], $new_cookies) ) {  </span></li>
<li class="alt">
<span>            $</span><span class="attribute"><font color="#ff0000">cookiestr</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">implode</font></span><span>('; ', $new_cookies[1]);  </span>
</li>
<li class="">
<span>            $cookiestr </span><span class="attribute"><font color="#ff0000">.</font></span><span>= </span><span class="attribute-value"><font color="#0000ff">'; verifysession='</font></span><span>.$cookie;  </span>
</li>
<li class="alt"><span>        }  </span></li>
<li class=""><span> </span></li>
<li class="alt"><span>        $r['login'] = true;  </span></li>
<li class=""><span>        $r['cookie'] = $cookiestr;  </span></li>
<li class="alt"><span>        return $r;  </span></li>
<li class=""><span>    }  </span></li>
<li class="alt"><span> </span></li>
<li class=""><span>    function openEmail($param)   </span></li>
<li class="alt"><span>    {  </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">openEmail</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">array</font></span><span>(  </span>
</li>
<li class="alt">
<span>            'url'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>'http://'.$param['server_no'].'.mail.qq.com/cgi-bin/autoactivation?</span><span class="attribute"><font color="#ff0000">actmode</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">6</font></span><span>&</span><span class="attribute"><font color="#ff0000">sid</font></span><span class="attribute-value"><font color="#0000ff">sid</font></span><span>='.$param['sid'],  </span>
</li>
<li class="">
<span>            'header' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> true,  </span>
</li>
<li class="alt">
<span>            'cookie' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> $param['cookie'],  </span>
</li>
<li class="">
<span>            'referer' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> 'http://'.$param['server_no'].'mail.qq.com/cgi-bin/autoactivation?</span><span class="attribute"><font color="#ff0000">sid</font></span><span>='.$param['sid</span><span class="attribute-value"><font color="#0000ff">'].'</font></span><span>&</span><span class="attribute"><font color="#ff0000">action</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">reg_activate</font></span><span>&</span><span class="attribute"><font color="#ff0000">actmode</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">6</font></span><span>',   </span>
</li>
<li class="alt">
<span>            'httpheader'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>array(  </span>
</li>
<li class=""><span>                "Host: " . $param['server_no'] . '.mail.qq.com',  </span></li>
<li class="alt">
<span>                'Accept-Charset: gb2312,utf-8;</span><span class="attribute"><font color="#ff0000">q</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">0</font></span><span>.7,*;</span><span class="attribute"><font color="#ff0000">q</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">0</font></span><span>.7',  </span>
</li>
<li class=""><span>                "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9 FirePHP/0.2.4",  </span></li>
<li class="alt"><span>            ),  </span></li>
<li class=""><span>        );  </span></li>
<li class="alt"><span> </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">data</font></span><span> =  $this-</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>curlFunc($openEmail);  </span>
</li>
<li class="alt">
<span>        if (preg_match('|</span><span class="attribute"><font color="#ff0000">Set-Cookie:qqmail_activated</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">0</font></span><span>|i', $data['html'])) {  </span>
</li>
<li class=""><span>            $param['active'] = true;  </span></li>
<li class="alt">
<span>            $param['cookie'] = $param['cookie'] .'; </span><span class="attribute"><font color="#ff0000">qqmail_activated</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">0</font></span><span>; </span><span class="attribute"><font color="#ff0000">qqmail_alias</font></span><span>=';  </span>
</li>
<li class=""><span>        }  </span></li>
<li class="alt"><span>        return $param;  </span></li>
<li class=""><span>    }  </span></li>
<li class="alt"><span> </span></li>
<li class=""><span>    /**   </span></li>
<li class="alt"><span>     *   </span></li>
<li class=""><span>     * 获取friends数据   </span></li>
<li class="alt"><span>     *   </span></li>
<li class="">
<span>     * @param $</span><span class="attribute"><font color="#ff0000">param</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">array</font></span><span>(  </span>
</li>
<li class="alt">
<span>     *   </span><span class="attribute"><font color="#ff0000">sid</font></span><span>=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>String , //用户认证的唯一标示  </span>
</li>
<li class="">
<span>     *   </span><span class="attribute"><font color="#ff0000">login</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> Boolean, //true 登陆成功 ,false 登陆失败  </span>
</li>
<li class="alt">
<span>     *   </span><span class="attribute"><font color="#ff0000">server_no</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> String // 服务器编号  </span>
</li>
<li class="">
<span>     *   </span><span class="attribute"><font color="#ff0000">active</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> Boolean //true 已开通 ,false 未开通 邮箱  </span>
</li>
<li class="alt">
<span>     *   </span><span class="attribute"><font color="#ff0000">cookie</font></span><span> =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> String // 获取数据cookie  </span>
</li>
<li class=""><span>     *  </span></li>
<li class="alt"><span>     * );  </span></li>
<li class=""><span>     * @return Array(  </span></li>
<li class="alt">
<span>     *   </span><span class="attribute"><font color="#ff0000">key</font></span><span>=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>value, // key:qq号,value: nickname  </span>
</li>
<li class=""><span>     * );  </span></li>
<li class="alt"><span>     */  </span></li>
<li class=""><span>    function getFriends($param)  </span></li>
<li class="alt"><span>    {  </span></li>
<li class=""><span> </span></li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">friend</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">array</font></span><span>(  </span>
</li>
<li class="">
<span>            'url'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>'http://'.$param['server_no'].'.mail.qq.com/cgi-bin/addr_listall?</span><span class="attribute"><font color="#ff0000">type</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">user</font></span><span>&&</span><span class="attribute"><font color="#ff0000">category</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">all</font></span><span>&</span><span class="attribute"><font color="#ff0000">sid</font></span><span class="attribute-value"><font color="#0000ff">sid</font></span><span>='.$param['sid'],  </span>
</li>
<li class="alt">
<span>            'header' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> true,  </span>
</li>
<li class="">
<span>            'cookie' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> $param['cookie'],  </span>
</li>
<li class="alt">
<span>            'referer' =</span><span class="tag"><strong><font color="#006699">></font></strong></span><span> 'http://m151.mail.qq.com/cgi-bin/addr_listall?</span><span class="attribute"><font color="#ff0000">sid</font></span><span>='.$param['sid</span><span class="attribute-value"><font color="#0000ff">'].'</font></span><span>&</span><span class="attribute"><font color="#ff0000">sorttype</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">null</font></span><span>&</span><span class="attribute"><font color="#ff0000">category</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">common</font></span><span>',  </span>
</li>
<li class="">
<span>            'httpheader'=</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>array(  </span>
</li>
<li class="alt"><span>                "Host: " . $param['server_no'] . '.mail.qq.com',  </span></li>
<li class="">
<span>                'Accept-Charset:utf-8;</span><span class="attribute"><font color="#ff0000">q</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">0</font></span><span>.7,*;</span><span class="attribute"><font color="#ff0000">q</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">0</font></span><span>.7',  </span>
</li>
<li class="alt"><span>                "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9 FirePHP/0.2.4",  </span></li>
<li class=""><span>            ),  </span></li>
<li class="alt"><span>        );  </span></li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">r</font></span><span> = $this-</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>curlFunc($friend);  </span>
</li>
<li class="alt"><span>        if ($r['http_code'] != 200) {  </span></li>
<li class="">
<span>            $this-</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>error($r);  </span>
</li>
<li class="alt"><span>            return false;  </span></li>
<li class=""><span>        }  </span></li>
<li class="alt">
<span>        $</span><span class="attribute"><font color="#ff0000">data</font></span><span> =  $r['html'];  </span>
</li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">preg</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">preg_match_all</font></span><span>('|</span><strong><font color="#006699"><span class="tag"><span class="tag-name">p</span></span></font></strong><span> </span><span class="attribute"><font color="#ff0000">class</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">"L_n"</font></span><strong><font color="#006699"><span class="tag">></span><span class="tag"><span class="tag-name">span</span><span class="tag">></span><span class="tag"><span class="tag-name">img</span></span></span></font></strong><span> </span><span class="attribute"><font color="#ff0000">class</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">"L_q"</font></span><span> </span><span class="attribute"><font color="#ff0000">name</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">qqplusimg</font></span><span> </span><span class="attribute"><font color="#ff0000">key</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">"(d+)"</font></span><span>[^</span><span class="tag"><strong><font color="#006699">></font></strong></span><span>]+</span><span class="tag"><strong><font color="#006699">/></font></strong></span><span> ([^</span><span class="tag"><strong><font color="#006699"></font></strong></span><span>]+)</span><strong><font color="#006699"><span class="tag"></span><span class="tag-name">span</span><span class="tag">></span><span class="tag"></span><span class="tag-name">p</span><span class="tag">></span></font></strong><span>|i', $data, $temp_list);  </span>
</li>
<li class="alt">
<span>        if ($</span><span class="attribute"><font color="#ff0000">preg</font></span><span> == 0) return array();  </span>
</li>
<li class="">
<span>        $</span><span class="attribute"><font color="#ff0000">list</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">array_combine</font></span><span>($temp_list[1],$temp_list[2]);  </span>
</li>
<li class="alt"><span>        return $list;  </span></li>
<li class=""><span>    }  </span></li>
<li class="alt"><span> </span></li>
<li class=""><span>    /**   </span></li>
<li class="alt"><span>     * 错误显示  </span></li>
<li class=""><span>     *   </span></li>
<li class="alt"><span>     * @param $str array  </span></li>
<li class=""><span>     *   </span></li>
<li class="alt"><span>     * @return   </span></li>
<li class=""><span>     */  </span></li>
<li class="alt"><span>    function error($str) {  </span></li>
<li class=""><span>        $str['html'] = str_replace('script','', $str['html']);  </span></li>
<li class="alt"><span>        var_dump($str);  </span></li>
<li class=""><span>        exit;  </span></li>
<li class="alt"><span>    }  </span></li>
<li class=""><span>}  </span></li>
<li class="alt"><span> </span></li>
<li class="">
<span></span><span class="tag"><strong><font color="#006699">?></font></strong></span><span> </span>
</li>
</ol>
Nach dem Login kopieren

怎么样,通过以上对于PHP获取QQ邮箱好友的代码的介绍,大家是否已经完全掌握了呢?


Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn

Heiße KI -Werkzeuge

Undresser.AI Undress

Undresser.AI Undress

KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover

AI Clothes Remover

Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool

Undress AI Tool

Ausziehbilder kostenlos

Clothoff.io

Clothoff.io

KI-Kleiderentferner

AI Hentai Generator

AI Hentai Generator

Erstellen Sie kostenlos Ai Hentai.

Heißer Artikel

R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)
2 Wochen vor By 尊渡假赌尊渡假赌尊渡假赌
Repo: Wie man Teamkollegen wiederbelebt
1 Monate vor By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Abenteuer: Wie man riesige Samen bekommt
4 Wochen vor By 尊渡假赌尊渡假赌尊渡假赌

Heiße Werkzeuge

Notepad++7.3.1

Notepad++7.3.1

Einfach zu bedienender und kostenloser Code-Editor

SublimeText3 chinesische Version

SublimeText3 chinesische Version

Chinesische Version, sehr einfach zu bedienen

Senden Sie Studio 13.0.1

Senden Sie Studio 13.0.1

Leistungsstarke integrierte PHP-Entwicklungsumgebung

Dreamweaver CS6

Dreamweaver CS6

Visuelle Webentwicklungstools

SublimeText3 Mac-Version

SublimeText3 Mac-Version

Codebearbeitungssoftware auf Gottesniveau (SublimeText3)

OKX OUYI Offizielles Website Registrierungsportal 2025 OKX OUYI Offizielles Website Registrierungsportal 2025 Mar 04, 2025 pm 11:45 PM

OKX Ouyi ist eine führende Kryptowährungs -Handelsplattform. Dieser Artikel enthält detaillierte Schritte, um Sie zum Registrieren eines OKX Ouyi Official -Website -Kontos zu führen. Sie erfahren, wie Sie auf die offizielle Website zugreifen, die Registrierungsmethode auswählen, die erforderlichen Informationen eingeben und den Registrierungsprozess abschließen. Der Artikel enthält auch Informationen zu Vorsichtsmaßnahmen, z. B. die Bedeutung der Verwendung realer persönlicher Informationen und der Festlegung eines starken Kennworts.

Sesam Open Door Exchange Webseite Login Neueste Version Gateio Offizieller Website Eingang Sesam Open Door Exchange Webseite Login Neueste Version Gateio Offizieller Website Eingang Mar 04, 2025 pm 11:48 PM

Eine detaillierte Einführung in den Anmeldungsbetrieb der Sesame Open Exchange -Webversion, einschließlich Anmeldeschritte und Kennwortwiederherstellungsprozess.

Gateio Exchange App Old Version Gateio Exchange App Old Version Download Kanal Gateio Exchange App Old Version Gateio Exchange App Old Version Download Kanal Mar 04, 2025 pm 11:36 PM

Gateio Exchange-App-Kanäle für alte Versionen, die offizielle Anwendungsmärkte von Drittanbietern, Forum-Communities und andere Kanäle abdecken.

Registrieren Sie sich und laden Sie die neueste App auf der offiziellen Bitget -Website herunter und laden Sie sie herunter Registrieren Sie sich und laden Sie die neueste App auf der offiziellen Bitget -Website herunter und laden Sie sie herunter Mar 05, 2025 am 07:54 AM

Dieser Leitfaden enthält detaillierte Download- und Installationsschritte für die offizielle Bitget Exchange -App, die für Android- und iOS -Systeme geeignet ist. Der Leitfaden integriert Informationen aus mehreren maßgeblichen Quellen, einschließlich der offiziellen Website, dem App Store und Google Play, und betont Überlegungen während des Downloads und des Kontoverwaltung. Benutzer können die App aus offiziellen Kanälen herunterladen, einschließlich App Store, offizieller Website APK Download und offizieller Website -Sprung sowie vollständige Registrierung, Identitätsüberprüfung und Sicherheitseinstellungen. Darüber hinaus deckt der Handbuch häufig gestellte Fragen und Überlegungen ab, wie z.

Sesam Open Door Login Registrierung Eingangstor Sesam Open Door Login Registrierung Eingangstor Mar 04, 2025 pm 04:51 PM

Gate.io (Sesam Open Door) ist die weltweit führende Kryptowährungsprüfung. Das Tutorial umfasst Schritte wie Kontoregistrierung und Anmeldung, KYC -Zertifizierung, Fiat -Währung und digitale Währungsaufladung, Handelspaarauswahl, Grenz-/Markttransaktionsbestellungen sowie Bestellungen und Transaktionsaufzeichnungen, wodurch Sie schnell auf der Gate.IO -Plattform für den Kryptowährungshandel beginnen. Egal, ob ein Anfänger oder ein Veteran, Sie können von diesem Tutorial profitieren und die Handelsfähigkeiten von Gate.io problemlos beherrschen.

Gate.io Offizielle Login -Web -Version Sesam Open Door Trading Platform Web Version Anmelde Webversion Webversion Gate.io Offizielle Login -Web -Version Sesam Open Door Trading Platform Web Version Anmelde Webversion Webversion Mar 04, 2025 pm 04:33 PM

Die Anmeldemethode der Sesam Open Door Trading Platform ist praktisch. Die Plattform kann Sicherheitsüberprüfungsmechanismen wie 2FA ermöglichen, um die Sicherheit der Kontos zu gewährleisten.

Das neueste Registrierungsportal für die offizielle Website von Ouyi Das neueste Registrierungsportal für die offizielle Website von Ouyi Mar 21, 2025 pm 05:54 PM

Als weltweit führende digitale Asset Trading Platform zieht Ouyi OKX viele Investoren mit ihren reichhaltigen Handelsprodukten, starken Sicherheitsgarantien und bequemen Benutzererfahrungen an. Die Risiken der Netzwerksicherheit werden jedoch immer schwerwiegender, und es ist entscheidend, das offizielle Ouyi OKX -Konto sicher zu registrieren. In diesem Artikel wird das neueste Registrierungsportal für die offizielle Website von Ouyi OKX enthält und die Schritte und Vorsichtsmaßnahmen für eine sichere Registrierung ausführlich erläutert, einschließlich der Identifizierung der offiziellen Website, der festen Überprüfung der Zwei-Faktor usw., damit Sie Ihre digitale Anlageninvestitionsreise sicher und bequem beginnen können. Bitte beachten Sie, dass es Risiken bei der Investition in Digital Asset gibt. Bitte treffen Sie vorsichtige Entscheidungen.

Ouyi OKX Handelsplattform App Offizielle Website Registrierung Portal Ouyi OKX Handelsplattform App Offizielle Website Registrierung Portal Mar 04, 2025 pm 11:27 PM

OKX Trading Platform, eine Digital Asset Trading Platform, die von globalen Benutzern vertraut ist. Die Plattform bietet eine Vielzahl von Handelsdiensten für digitale Vermögenswerte, darunter Spot -Handel, Futures -Handel, Optionshandel usw.

See all articles