Many people like to DIY their own Weibo on the website, so I also wrote one.
The Weibo show address in Sina Weibo tool is directly captured here.
Copy code The code is as follows:
set_time_limit(0);
$url= "http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=550&fansRow=2&ptype=1&speed=0&skin=1&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=1724077823&verifier=8738a0fa&dpc=1"; // Weibo show address
$ch=curl_init();
curl_setopt($ch,CURLOPT_HEADER,false);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER ,1);
$content=curl_exec($ch);
curl_close($ch);
preg_match_all('/
(.*)
preg_match_all('/
(.*)/iUs',$content,$ time);//Get time
$me=explode('
',$content);
$me=explode('
',$me [1]);
preg_match_all("/src="([^"].*)"/iUs",$me[0],$avatar);//Get my avatar
$a=$text[0];
$b=$time[0];
$result=array_combine($a, $b);//Combine arrays
foreach($result as $text=>$time){
echo "";
echo strip_tags( $text);
echo strip_tags($time);
}
?>
http://www.bkjia.com/PHPjc/761666.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/761666.htmlTechArticleMany people like to DIY their own Weibo on the website, so I also wrote one. Here we directly capture the Weibo show address in Sina Weibo tool. Copy the code The code is as follows: ?php set_t...