我想写一个百度音乐小偷,但不知道为什么就是下载页总是偷不过来,求助大神?
代码:
<?php
$url="http://music.baidu.com/song/115087381?infrom=new&uid=14A8F290-E4CA-E0B1-4B9E-052FB2EBBC4B";//假设偷盗地址
$h="User-Agent:UCWEB 8.9.0.253/28/999";//手机UA
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url);//设置访问的url地址
curl_setopt( $ch, CURLOPT_TIMEOUT, 30);//设置超时
curl_setopt( $ch, CURLOPT_USERAGENT, $h);//模拟手机UA
curl_setopt( $ch, CURLOPT_REFERER,1);//设置 referer
curl_setopt( $ch,CURLOPT_FOLLOWLOCATION,1);//跟踪301
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);//返回结果
$r = curl_exec($ch);
curl_close($ch);
echo $r;
?>
可为什么访问显示“{"error":22232,"xcode":"","songInfo":""}”,什么意思?