$ip = '127.0.0.1';

function _GetIP() { $ip = getenv("REMOTE_ADDR"); $ip1 " /> 播放黄色一级片,成人a毛片高清视频,亚洲www美色

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

PHP音樂采集(部分代碼)

<?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("/發(fā)行公司:<//strong>(.*)/",$songer[1],$company);#發(fā)行公司

                preg_match("/發(fā)行時(shí)間<//strong>:(.*)<//td> <//tr>/",$makeFile,$date);#發(fā)行時(shí)間
                preg_match("/(.*)<//td>/",$date[1],$date2);#發(fā)行時(shí)間
                preg_match("/<//strong>(.*)/",$date[1],$language);#發(fā)行語言


                preg_match("/專輯簡(jiǎn)介:<//strong><//td> <td colspan=2>(.*)<//td><//tr><//table><br>/",$makeFile,$descript);#專輯簡(jiǎn)介


                $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技術(shù)PHP音樂采集(部分代碼),轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 五月天婷婷激情视频 | 国产精品二区页在线播放 | 综合激情区视频一区视频二区 | dxj在线视频·男人的天堂网站 | 一区二区三区四区在线播放 | 国产成人久久蜜一区二区 | 国产xxxxx在线播放 | 亚洲第一综合网 | 成年人福利视频 | 尹人久久大香找蕉综合影院 | 在线观看视频www在线观看 | 国产午夜三区视频在线 | 精品91视频| 国产福利在线看 | 真实国产乱子伦精品免费 | 高清视频一区二区 | 一二三区在线观看 | 欧美日韩激情一区二区三区 | 91精品福利在线 | 美女黄视频在线 | 在线欧美成人 | 亚洲网站一区 | 国产精品福利一区 | 日韩在线二区全免费 | 国产高清自拍视频 | 久久精品久久精品久久精品 | 丁香婷婷成人 | 国内精品免费网站牛牛 | 国产女人成人精品视频 | 亚洲精品第一页中文字幕 | 精品国产制服丝袜高跟 | 美女视频黄是免费的 | 美国bbbbbbbbb免费毛片 | 91久久国产视频 | 99在线观看国产 | 婷婷久久综合网 | 国产成人永久免费视频 | 亚洲欧美日本在线 | 看全色黄大色黄女视频 | 福利免费视频 | 国产91对白在线 |