21,882
社区成员
发帖
与我相关
我的任务
分享
$url='http://rate.taobao.com/member_rate.htm?content=1&result=0&from=rate&user_id=281461646&identity=1&rater=0&direction=0&timeLine=-7&callback=shop_rate_list';
$con= file_get_contents($url);
$con= preg_replace('/shop_rate_list\((.*)\)/s','$1',$con);
print_r(json_decode(iconv('gbk','utf-8',$con),true));
( ! ) Notice: Undefined variable: url in E:\wwwroot\post\Untitled-2.php on line 13
Call Stack
# Time Memory Function Location
1 0.0008 366624 {main}( ) ..\Untitled-2.php:0
( ! ) Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in E:\wwwroot\post\Untitled-2.php on line 13
Call Stack
# Time Memory Function Location
1 0.0008 366624 {main}( ) ..\Untitled-2.php:0
2 0.0011 366808 file_get_contents ( ) ..\Untitled-2.php:13
$con= file_get_contents($url);
$con= preg_replace('/shop_rate_list\((.*)\)/s','$1',$con);
print_r(json_decode(iconv('gbk','utf-8',$con),true));
Array
(
[watershed] => 100
[maxPage] => 1
[currentPageNum] => 1
[rateListDetail] => Array
(
[0] => Array
(
[XID] =>
[append] =>
[auction] => Array
(
[XID] =>
[aucNumId] => 10653792806
[auctionPrice] => 2168
[link] => http://trade.taobao.com/trade/detail/trade_snap.htm?trade_id=180368285769180
[sku] => 机身颜色:港版ME860【官网可查 最新3月出厂 现货当天发】 手机套餐:套餐四
[thumbnail] =>
[title] => 港版ME860 Motorola/摩托罗拉 MB860/Atrix 4G 如何鉴别翻新机
)
[award] =>
[content] => 一般
[date] => 2012.06.04
[from] =>
[photos] => Array
(
)
[rate] => 0
[rateId] => 18709606527
[raterType] => 0
[reply] =>
[shareInfo] => Array
(
[XID] =>
[lastReplyTime] =>
[pic] => 0
[reply] => 0
[share] =>
[userNumIdBase64] =>
)
[spuRatting] => Array
(
)
[tag] =>
[tradeId] => 180368285769180
[useful] => 0
[user] => Array
(
[anony] =>
[avatar] =>
[displayRatePic] => b_red_2.gif
[nick] => 相爱没那么容易8
[nickUrl] => http://wow.taobao.com/u/ODM0NTY4MDkx/view/ta_taoshare_list.htm?redirect=fa
[rank] => 39
[rankUrl] => http://rate.taobao.com/rate.htm?user_id=834568091&rater=1
[userId] => 834568091
[vip] =>
[vipLevel] => 2
)
[validscore] => 1
)
)
)
$.getJSON("http://rate.taobao.com/member_rate.htm?content=1&result=0&from=rate&user_id=281461646&identity=1&rater=0&direction=0&timeLine=-7&callback=shop_rate_list", function(json){
alert("JSON Data: " + json);
});