<?php
/* +
1.判断是否赞过
2.记录上一次赞过的地方
3.读取空间信息到上一次赞过的地方为止
作者:anylove
*/
class z_class{
function is_zan($qq,$sid){
/*判断是否赞过,如果没有赞过,则得到他的赞的地址*/
$ch=curl_init("http://ish.z.qq.com/infocenter_v2.jsp?B_UID={$qq}&sid={$sid}&g_ut=1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$this->contents=curl_exec($ch);
curl_close($ch);
preg_match_all('@<a href="http://blog(\d)0.z.qq.com/like/like_action.jsp(.*)">赞\(\d{1,}\)</a>@Ui',$this->contents,$this->url_array);//得到含大量需要赞的地址
$n=count($this->url_array['2']);
$this->zz=$zan+$n;
for($i=0;$i<$n;$i++){
$this->url="http://blog".$this->url_array['1'][$i]."0.z.qq.com/like/like_action.jsp".$this->url_array['2'][$i];
$ch=curl_init(html_entity_decode($this->url));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res=curl_exec($ch);
curl_close($ch);
echo $res;
}
}
}
?>
Back to home |
File page
Subscribe |
Register |
Login
| N