已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程 > PHP > 源码

标题: 从最新快乐提取的PC秒赞核心代码

作者: @Ta

时间: 2015-05-23

点击: 5288

提取自快乐秒赞1.4.5
[code] public function newpclike()
{
$url = 'http://ic2.s51.qzone.qq.com/cgi-bin/feeds/feeds3_html_more?format=json&begintime='.time().'&count=20&uin='.$this->uin.'&g_tk='.$this->gtk;
$json = $this->get_curl($url, 0, 0, $this->cookie);
$arr = json_decode($json, true);

if ($arr
 == -3000) {
			$this->skeyzt = 1;
			$this->error[] = $this->error . '获取说说列表失败,原因SKEY过期![PC]';
		}
		else {
			$this->msg[] = $this->error . '获取说说列表成功[PC]';
			$json = str_replace(array("\\x22", "\\x3C", "\/"), array('"', '<', '/'), $json);

			if (preg_match_all('/data\-unikey="([0-9A-Za-z\.\-\_\/\:]+)" data\-curkey="([0-9A-Za-z\.\-\_\/\:]+\/([0-9A-Za-z]+))" data\-clicklog="like" href="javascript\:\;"><i class="ui\-icon icon\-praise"><\/i>赞/iUs', $json, $arr)) {
				foreach ($arr[1] as $k => $row ) {
					preg_match('/\/(\d+)\//', $row, $match);
					$this->touin = $match[1];
					$type = 0;
					$key = $arr[2][$k];
					$fid = $arr[3][$k];

					if ($row != $key) {
						$type = 5;
					}

					$this->pclike($key, $row, 1, '311', $type, time(), $fid);

					if ($this->skeyzt) {
						break;
					}
				}
			}
			else {
				$this->msg[] = $this->error . '没有要赞的说说[PC]';
			}
		}
	}


这个的好处是直接从PC版获取说说列表,不用像以前那样还要从触屏版获取说说列表了

[隐藏样式|查看源码]


『回复列表(9|隐藏机器人聊天)』

1. 谁能帮我把这个给社了:http://api.ww78.net/api/login/index.php
(/@Ta/2015-05-23 21:45//)

2. @net909,什么东西
(/@Ta/2015-05-23 21:55//)

3. 谢谢
(/@Ta/2015-05-23 23:13//)

4. @net909,快乐的秒评能弄懂吗?好给力的样子!
(/@Ta/2015-05-23 23:15//)

5. @net909,这个能添加到彩虹任务吗?
(/@Ta/2015-05-23 23:18//)

6. (๑• . •๑)
(/@Ta/2015-05-23 23:18//)

7. 比触屏好在哪里
(/@Ta/2015-05-24 00:43//)

8. @net909,这样的话,SKEY过期,就不能获取说说列表了,触屏版就废了
(/@Ta/2015-06-02 20:18//)

9. @忘最初,本来pc赞就需要skey,之所以不用触屏版是因为触屏协议会经常提示操作频繁
(/@Ta/2015-06-02 22:20//)

回复需要登录

7月26日 05:15 星期六

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1