http://www.12306.cn/mormhweb/k PHP music collection part code

WBOY
Release: 2016-07-29 08:36:15
Original
1024 people have browsed it

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);                                                                     #Download pictures
                                                                                                                                                                     !='es/Nophoto.gif' )
                                                                      $File2 = fopen($p_url,'rb')
";
                                                                                                       ​                                                                                                                         $File2);
                                                                            $Fp2 = fopen ($Filename2,'w+');
                                                                                               Fp2);
                                                                                                                                                                  
             preg_match("/Album:(.*)                                                                                                                                                                      ($name[1]);
                                                                                                                                                                                                                      ; ("/Issuing company:(.*)/",$songer[1],$company);#Issuing company
                                                                                                                                                               /td> Time
                                                                                                                                                                             ;td colspan=2>(.*)
/",$makeFile,$descript);#Album Introduction
                                                                                                          [1]);                                                                                                                                                                $company=                                          Preg_match_all("/download1.asp?id=(d+) &which=BakDownUrl1/",$makeFile,$id2);#Song ID
                                                                                                {                                                    sql = " insert into tx_music set musicID='".$id2[1][$jj]."',specialID='$i',specialName='$name',s
                                                                                                                                                                                                                                         . $jj]."
";
                                                                                                                                                                                   " $i',specialID='$i',specialName='$name',s
        echo $sql;
The above has introduced part of the PHP music collection code at http://www.12306.cn/mormhweb/k, including the content at http://www.12306.cn/mormhweb/k. I hope that friends are interested in PHP tutorials. Helps.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template