无为清净楼资源网 Design By www.qnjia.com
<?PHP
set_time_limit(0);
mysql_connect("localhost","root","");
mysql_select_Db("music_36g");
$ip = '127.0.0.1';
function _GetIP()
{
$ip = getenv("REMOTE_ADDR");
$ip1 = getenv("HTTP_X_FORWARDED_FOR");
$ip2 = getenv("HTTP_CLIENT_IP");
($ip1) ? $ip = $ip1 : null ;
($ip2) ? $ip = $ip2 : null ;
return $ip;
}
function MakePassword($length=10)
{
$password = '';
$chars =
array
(
"1","2","3","4","5","6","7","8","9","0",
"a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J",
"k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T",
"u","U","v","V","w","W","x","X","y","Y","z","Z"
);
$count = count($chars) - 1;
srand((double)microtime()*1000000);
for($i = 0; $i < $length; $i++)
{
$password .= $chars[rand(0, $count)];
}
return($password);
}
if ( _GetIP() != $ip )
{
exit("Can't Run!");
}
for ( $i=2;$i<5769;$i++)//52738
{
$url = "http://music.36g.net/SpecialInfo/showspecial".$i.".htm";
$File = @fopen($url,'rb');
if ( $File )
{
$makeFile = $buffer = "";
$buffer = "";
while ($buffer = fread($File,4096))
{
$makeFile = $makeFile.$buffer;
}
@fclose($File);
preg_match("/src=\/uppic\/(.*) width=135/",$makeFile,$pic);#图片
#下载图片
if ( $pic[1]!='es/Nophoto.gif' )
{
$p_url = "http://music.36g.net/uppic/".$pic[1];
$File2 = fopen($p_url,'rb');
if ( $File2 )
{
$Buffer2 = $makeFile2 = "";
while ($Buffer2 = fread($File2,4096))
{
$makeFile2 = $makeFile2.$Buffer2;
}
fclose($File2);
$Filename2 = './pic/'.$pic[1];
$Fp2 = fopen ($Filename2,'w+');
fwrite($Fp2,$makeFile2);
fclose($Fp2);
}
}
else
{
$pic[1] = '';
}
preg_match("/专辑:<\/strong>(.*)<\/td><td width=(\d+) rowspan=6/",$makeFile,$name);#专辑名称
$name = addslashes($name[1]);
preg_match("/歌手:<\/strong>(.*)<\/td><\/tr><tr><td>/",$makeFile,$songer);#歌手名称
preg_match("/(.*)<\/td><\/tr><tr><td>/",$songer[1],$songer_name);#歌手名称
preg_match("/发行公司:<\/strong>(.*)/",$songer[1],$company);#发行公司
preg_match("/发行时间<\/strong>:(.*)<\/td> <\/tr>/",$makeFile,$date);#发行时间
preg_match("/(.*)<\/td>/",$date[1],$date2);#发行时间
preg_match("/<\/strong>(.*)/",$date[1],$language);#发行语言
preg_match("/专辑简介:<\/strong><\/td> <td colspan=2>(.*)<\/td><\/tr><\/table><br>/",$makeFile,$descript);#专辑简介
$songer_name = addslashes($songer_name[1]);
$company= addslashes($company[1]);
$descript= addslashes($descript[1]);
#取得歌曲ID
preg_match_all("/download1\.asp\?id=(\d+)&which=BakDownUrl1/",$makeFile,$id2);#歌曲ID
$num = count($id2[1]);
for ($jj=0;$jj<$num;$jj++)
{
$sql = " insert into tx_music set musicID='".$id2[1][$jj]."',specialID='$i',specialName='$name',songerName='$songer_name',orderByID='".$id2[1][$jj]."' ";
//echo $id2[1][$jj]."<br>";
mysql_query($sql);
}
//echo $descript."<br><br>";
$sql = " insert into tx_special set orderByID='$i',specialID='$i',specialName='$name',songerName='$songer_name',company='$company',date='$date2[1]',language='$language[1]',picture='$pic[1]',musicNum='$num',createDate='".time()."',description='$descript' ";
echo $sql;
mysql_query($sql);
}
}
?>
set_time_limit(0);
mysql_connect("localhost","root","");
mysql_select_Db("music_36g");
$ip = '127.0.0.1';
function _GetIP()
{
$ip = getenv("REMOTE_ADDR");
$ip1 = getenv("HTTP_X_FORWARDED_FOR");
$ip2 = getenv("HTTP_CLIENT_IP");
($ip1) ? $ip = $ip1 : null ;
($ip2) ? $ip = $ip2 : null ;
return $ip;
}
function MakePassword($length=10)
{
$password = '';
$chars =
array
(
"1","2","3","4","5","6","7","8","9","0",
"a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J",
"k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T",
"u","U","v","V","w","W","x","X","y","Y","z","Z"
);
$count = count($chars) - 1;
srand((double)microtime()*1000000);
for($i = 0; $i < $length; $i++)
{
$password .= $chars[rand(0, $count)];
}
return($password);
}
if ( _GetIP() != $ip )
{
exit("Can't Run!");
}
for ( $i=2;$i<5769;$i++)//52738
{
$url = "http://music.36g.net/SpecialInfo/showspecial".$i.".htm";
$File = @fopen($url,'rb');
if ( $File )
{
$makeFile = $buffer = "";
$buffer = "";
while ($buffer = fread($File,4096))
{
$makeFile = $makeFile.$buffer;
}
@fclose($File);
preg_match("/src=\/uppic\/(.*) width=135/",$makeFile,$pic);#图片
#下载图片
if ( $pic[1]!='es/Nophoto.gif' )
{
$p_url = "http://music.36g.net/uppic/".$pic[1];
$File2 = fopen($p_url,'rb');
if ( $File2 )
{
$Buffer2 = $makeFile2 = "";
while ($Buffer2 = fread($File2,4096))
{
$makeFile2 = $makeFile2.$Buffer2;
}
fclose($File2);
$Filename2 = './pic/'.$pic[1];
$Fp2 = fopen ($Filename2,'w+');
fwrite($Fp2,$makeFile2);
fclose($Fp2);
}
}
else
{
$pic[1] = '';
}
preg_match("/专辑:<\/strong>(.*)<\/td><td width=(\d+) rowspan=6/",$makeFile,$name);#专辑名称
$name = addslashes($name[1]);
preg_match("/歌手:<\/strong>(.*)<\/td><\/tr><tr><td>/",$makeFile,$songer);#歌手名称
preg_match("/(.*)<\/td><\/tr><tr><td>/",$songer[1],$songer_name);#歌手名称
preg_match("/发行公司:<\/strong>(.*)/",$songer[1],$company);#发行公司
preg_match("/发行时间<\/strong>:(.*)<\/td> <\/tr>/",$makeFile,$date);#发行时间
preg_match("/(.*)<\/td>/",$date[1],$date2);#发行时间
preg_match("/<\/strong>(.*)/",$date[1],$language);#发行语言
preg_match("/专辑简介:<\/strong><\/td> <td colspan=2>(.*)<\/td><\/tr><\/table><br>/",$makeFile,$descript);#专辑简介
$songer_name = addslashes($songer_name[1]);
$company= addslashes($company[1]);
$descript= addslashes($descript[1]);
#取得歌曲ID
preg_match_all("/download1\.asp\?id=(\d+)&which=BakDownUrl1/",$makeFile,$id2);#歌曲ID
$num = count($id2[1]);
for ($jj=0;$jj<$num;$jj++)
{
$sql = " insert into tx_music set musicID='".$id2[1][$jj]."',specialID='$i',specialName='$name',songerName='$songer_name',orderByID='".$id2[1][$jj]."' ";
//echo $id2[1][$jj]."<br>";
mysql_query($sql);
}
//echo $descript."<br><br>";
$sql = " insert into tx_special set orderByID='$i',specialID='$i',specialName='$name',songerName='$songer_name',company='$company',date='$date2[1]',language='$language[1]',picture='$pic[1]',musicNum='$num',createDate='".time()."',description='$descript' ";
echo $sql;
mysql_query($sql);
}
}
?>
标签:
PHP音乐采集(部分代码)
无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com
暂无评论...
更新日志
2024年11月15日
2024年11月15日
- 炉石传说月初最强卡组有哪些 2024月初最强上分卡组推荐
- 狼人杀亮相原生鸿蒙之夜 假面科技强势登陆华为生态
- 12小时光线挑战!AI画质专家才是大平层首选
- 2024游戏IP报告:1~9月规模1960亿 68%用户愿为之付费
- 群星.2024-今夜一起为爱鼓掌电视剧原声带【相信音乐】【FLAC分轨】
- BIGFOUR.2013-大家利事【寰亚】【WAV+CUE】
- 李美凤.1992-情深透全情歌集【EMI百代】【WAV+CUE】
- 田震2024-《时光音乐会》[金峰][WAV+CUE]
- 群星《监听天碟3》[LECD]限量版[WAV+CUE]
- 心妤《声如夏花HQ》头版限量编号[WAV+CUE]
- 群星《摇滚五杰》[低速原抓WAV+CUE][1.1G]
- 群星 《2024好听新歌30》十倍音质 U盘音乐 [WAV+分轨]
- 群星《试音草原·女声篇》经典蒙古民歌[WAV+CUE][1G]
- 陈慧娴《永远是你的朋友》头版限量编号MQA-UHQCD2024[低速原抓WAV+CUE]
- 曼丽·女人三十《如果·爱》限量1:1母盘直刻[低速原抓WAV+CUE]