@ouyang 发布的文章

phpcms v9自带的相关文章、专题等模块不支持order排序,调用的相关文章、专题默认为升序,这样就造成了一个问题,调出来的相关文章是最早的文章,没有时效性。我们只能通过修改程序文件,只需简单修改一个文件,就能达到我们的需求。
修改相关文章排序的方法:
打开根目录下的phpcms/modules/content/classes/content_tag.class.php,找到

$r = $this->db->select($sql2, '*', $limit, '','','id');

修改为:

$r = $this->db->select($sql2, '*', $limit, $order,'','','id');

PC标签格式如下:

{pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="5" order="inputtime DESC" keywords="$rs[keywords]"}

- 阅读剩余部分 -

QQ推出了群签到,连续签名15天会有橙色名字赐予,对于VIP党来说这可以忽略了。当然最重要的是可以批量进行签名,只要一个PHP文件即可,在服务器上做个定时任务,执行PHP,每天就能够自动签名了,一劳永逸的方法。
将下面代码存为PHP文件即可,放到服务器上或本地运行PHP即可执行你全部的群签到。
Github项目地址:https://github.com/xqin/qiandao

un = preg_replace('/^o0*/', '', $uin);//数字QQ号码
        $this->cookie = sprintf('Cookie: uin=%s; skey=%s;', $uin, $skey);//Cookie

        $this->g_tk = $this->getGTK($skey);//计算 g_tk

        $this->sign($this->getQunList());//获取群列表并签到
    }

    function getGTK($skey){
        $len = strlen($skey);
        $hash = 5381;

        for($i = 0; $i < $len; $i++){
            $hash += ($hash << 5) + ord($skey[$i]);
        }

        return $hash & 0x7fffffff;//计算g_tk
    }

    function getQunList(){
        $html = @file_get_contents(
                sprintf('http://qun.qzone.qq.com/cgi-bin/get_group_list?uin=%s&g_tk=%s', $this->un, $this->g_tk),
                false,
                stream_context_create(array(
                    'http'=>array(
                        'method'=>'GET',
                        'header'=>$this->cookie
                    )
                ))
            );

        preg_match('/(\{[\s\S]+\})/', $html, $qunList);

        if(count($qunList) == 0){
            return NULL;
        }

        $qunList = json_decode($qunList[1]);

        if($qunList == NULL || $qunList->code != 0){
            return NULL;
        }

        return $qunList->data->group;
    }

    function sign($groups){
        if($groups == NULL)return;

        $i = 1;
        foreach($groups as $qun){
            $this->qiandao($qun->groupid);//签到
            printf("%d\t%s(%d)\tok\r\n", $i++, $qun->groupname, $qun->groupid);//输出群信息
        }
    }

    function qiandao($qin){
        @file_get_contents($this->signUrl, false,
            stream_context_create(
                array('http' => array(
                    'method'  => 'POST',
                    'header'  => $this->cookie,
                    'content' => sprintf('gc=%s&is_sign=0&bkn=%s', $qin, $this->g_tk)
                ))
            )
        );
    }
}

这样玩不够爽?能自定义签到内容吗?这当然可以。
准备工具:Chrome和一个抓包工具,可以用Fiddler。
先打开Fiddler,然后打开想要签到的QQ群,点击签到功能(不要点击签到),然后在Fiddler里面能够找到gc和bkn的值。
QQ群BKN值

OK,打开Chrome,然后打开http://qiandao.qun.qq.com/,登录QQ,F12打开开发工具,先引入jq.
引入jq代码:

;(function(d,s){d.body.appendChild(s=d.createElement('script')).src='http://code.jquery.com/jquery-1.9.1.min.js'})(document);

然后(实现自定义签名说明的代码来了。)

$.post("http://qiandao.qun.qq.com/cgi-bin/sign",
	{
		gc:"XX55XXX", //这里填写你获取到的gc值
		is_sign:"0",
		from:"1",
		bkn:"XXX88XXXX", //这里填写你获取到的bkn值
		poi:"群也好久了,对于签到,其实是个苦力活,要签到起码要能够做点广告吧?来吧,来友链一个吧?http://www.joming.com 欢迎来换友链,就这样吧,Joming在此",
	},
	function(data,status)
		{
		alert("数据:"+ data.ec);
		}
	);

好了,检查你刚才打开的群吧。是不是签到成功了?

安装所需要的组建环境

yum install gcc libaio libaio-devel libstdc++ libstdc++-devel libgcc elfutils-libelf-devel glibc-devel glibc-devel gcc-c++ compat-libstdc++-33 unixODBC unixODBC-devel

Oracle安装还需要一个必要的rpm包,pdksh-5.2.14-37.el5_8.1.x86_64,解压rpm -ivh安装即可。

创建oinstall组
groupadd oinstall

创建dba组
groupadd dba

创建oracle用户
useradd -g oinstall -G dba oracle

修改oracle用户的密码
passwd oracle (设立会提示输入自己的密码)

- 阅读剩余部分 -