这个源码怎么用??


#TCP挂扣开始
function post_str($post_str){
$ip='121.14.102.159';

$port=14000;

$errno=0;

$errstr='';

$timeout=10;

$fp=fsockopen($ip,$port,$errno,$errstr,$timeout);

$content_length=strlen($post_str); 

$post_header="POST / HTTP/1.1";

$post_header.="Content-Type: text/plain";

$post_header.="User-Agent: UNTRUSTED/1.1";

$post_header.="Host:".$ip.":".$port;

$post_header.="Content-Length:".$content_length."\r\n"; 

$post_header.="Connection: close\r\n\r\n" ; 

$post_header.=$post_str."\r\n";

fwrite($fp,$post_header);

$str=fread($fp,1024);

return $str;

fclose($fp);

}
function tcp_gq($uin,$pw){
post_str("VER=1.4&CON=1&CMD=Login&SEQ=".rand(100,999)."&UIN=".$uin."&PS=".md5($pw)."&M5=1&LG=0&LC=2EC70D1101DB674F&GD=JTAIAHW97YPSYRPV&CKE="); 
}
#TCP挂扣结束

使用:
tcp_gq(帐号,密码);

外国空间需要发短信




弱弱的问下function tcp_gq($uin,$pw) 填帐号密码得不得去掉$? 
回复列表(6|隐藏机器人聊天)
  • @Ta / 2014-09-28 / /
    沙发
  • @Ta / 2014-09-28 / /
    要的。
  • @Ta / 2014-09-28 / /
    include引用这个文件然后,如:
    <?php
    include('php.php');
    tcp_gq('1782832653','11*********1');
    //function的作用是构造一个自定义函数
    //结束
  • @Ta / 2014-09-28 / /
    @谭辉
  • @Ta / 2014-09-28 / /
    @雨伤,怎么include引用?

    把我发那个代码新建个php文件,命名php.php,
    然后再把你发那个代码新建个文本么?原谅不懂php.....
  • @Ta / 2014-09-28 / /
    @谭辉,恩,是的,也可以这样
     <?php
    #TCP挂扣开始
    function post_str($post_str){
    $ip='121.14.102.159';
    
    $port=14000;
    
    $errno=0;
    
    $errstr='';
    
    $timeout=10;
    
    $fp=fsockopen($ip,$port,$errno,$errstr,$timeout);
    
    $content_length=strlen($post_str); 
    
    $post_header="POST / HTTP/1.1";
    
    $post_header.="Content-Type: text/plain";
    
    $post_header.="User-Agent: UNTRUSTED/1.1";
    
    $post_header.="Host:".$ip.":".$port;
    
    $post_header.="Content-Length:".$content_length."\r\n"; 
    
    $post_header.="Connection: close\r\n\r\n" ; 
    
    $post_header.=$post_str."\r\n";
    
    fwrite($fp,$post_header);
    
    $str=fread($fp,1024);
    
    return $str;
    
    fclose($fp);
    
    }
    function tcp_gq($uin,$pw){
    post_str("VER=1.4&CON=1&CMD=Login&SEQ=".rand(100,999)."&UIN=".$uin."&PS=".md5($pw)."&M5=1&LG=0&LC=2EC70D1101DB674F&GD=JTAIAHW97YPSYRPV&CKE="); 
    }
    #TCP挂扣结束
    tcp_gq('1782832653','1******1');
    //第一个是QQ号码  第二个是密码 
添加新回复
回复需要登录