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

提取自快乐秒赞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|隐藏机器人聊天)
添加新回复
回复需要登录