<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/4/1
* Time: 11:28
*/
$du = file_get_contents("http://www.iwebshop.com/libweibo-master/weibolist.php");
print_r($du);
die;
header("content-type:text/html;charset=utf-8");
$curl = curl_init('http://weibo.com/6096412314/profile?topnav=1&wvr=6&is_all=1');
$header = array();
$header[] = 'Accept: textml,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
$header[] = 'Accept-Encoding: gzip, deflate';
$header[] = 'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3';
$header[] = 'Cache-Control: no-cache, must-revalidate';
$header[] = 'Connection: keep-alive';
$header[] = 'Cookie: UOR=www.php100.com,widget.weibo.com,www.php100.com; SUB=_2AkMvYt58f8NhqwJRmP4XzW7kbo52zwzEieLBAH7sJRMxHRl-yT9jqhwMtRDHKBSIxbbXBT6LRqBgjaJ82LOvJw
..; SUBP=0033WrSXqPxfM72-Ws9jqgMF55529P9D9WFXYoZs_GXmuj2bLw8W.oCS; login_sid_t=02b90517fe4b755d6c1e977ba3dd78ac
; YF-Ugrow-G0=57484c7c1ded49566c905773d5d00f82; YF-Page-G0=8fee13afa53da91ff99fc89cc7829b07; _s_tentry
=-; Apache=3296074612273.181.1480491253134; SINAGLOBAL=3296074612273.181.1480491253134; ULV=1480491253338
:1:1:1:3296074612273.181.1480491253134:; TC-Ugrow-G0=e66b2e50a7e7f417f6cc12eec600f517; WBStorage=2c466cc84b6dda21
|undefined';
curl_setopt($curl, CURLOPT_HTTPHEADER,$header); //设置一个
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_ENCODING, 'gzip');
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$rs = curl_exec($curl);
//echo $rs;
//die;
$reg = '#<script>(.*)</script>#isU';
preg_match_all($reg,$rs,$arr);
$res = '#<script>(.*)</script>#isU';
preg_match_all($reg,$rs,$arr);
//print_r($arr);
//$data=unserialize($arr);
print_r($arr[1][29]);
;
curl_close($curl);
//echo $rs;
//die;
?>
采微博
最新推荐文章于 2024-01-24 16:28:48 发布