Home >Backend Development >PHP Tutorial >PHP-Huawei network disk is used as an external link to store MP3 and is called to the web page (this function is great! It saves space and is fast! It does not occupy local resources)_PHP tutorial

PHP-Huawei network disk is used as an external link to store MP3 and is called to the web page (this function is great! It saves space and is fast! It does not occupy local resources)_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:51:041493browse

1 First upload your MP3 files to Huawei network disk http://www.dbank.com/

2 Then share the MP3 files on the network disk http://dl.dbank.com/c03vylqaa5

3 Then replace the shared address into the $url variable

The general principle is this

Directly posted the test code in use on the Huawei network disk external link. After everyone tests it, remember to leave a message to me if you have any improvements, and I will go to your place to learn from it. If you reprint, please attach an address to the original text to support me!

[php] $url='http://dl.dbank.com/c03vylqaa5';
$fp1=fopen($url,"r");
//$fp2=fopen("t2.txt","w");
while(!feof($fp1)){
$a=fgets($fp1);
        ereg("^.*downloadUrl="http://dl.dbank.com/download/(.*)" nspurl="http://.*$",$a,$a_arr);
If($a_arr[1]!=""){
                   //print_r($a_arr);
                $mp3_url_a=$a_arr[1];
                                                                                                                                               unset($a_arr);
                                   
}  
$mp3_url_b='http://dl.dbank.com/download/';
$sg=$mp3_url_b.$mp3_url_a;


//$a='                                                                                     " size="501184" downloadUrl="http://dl.dbank.com/download/Pub_30.mp3?f=c03vylqaa5&i=1&h=1336754543&v=2ae7c1b5&u=acd24b23&ip=117.67.240.27&p=0" nspurl="http://file.dbank.com /file/MDAwMDAwMDGGcdM4xsCjehJZk5_PVkbcvOQQesha3ozaxUDCQvuSOg../36965e90de0a7b0df17d0783c90a349f7a5c0" href="#" class="ico ico-audio">Pub_30.mp3';
// ereg("^.*downloadUrl="http://dl.dbank.com/download/(.*)" nspurl="http://.*$",$a,$a_arr);
// print_r($a_arr);

?>

$url='http://dl.dbank.com/c03vylqaa5';
$fp1=fopen($url,"r");
//$fp2=fopen("t2.txt","w");
while(!feof($fp1)){
$a=fgets($fp1);
ereg("^.*downloadUrl="http://dl.dbank.com/download/(.*)" nspurl="http://.*$",$a,$a_arr);
if($a_arr[1]!=""){
//print_r($a_arr);
$mp3_url_a=$a_arr[1];
}
unset($a_arr);

}
$mp3_url_b='http://dl.dbank.com/download/';
$sg=$mp3_url_b.$mp3_url_a;

//$a='              Pub_30.mp3';
// ereg("^.*downloadUrl="http://dl.dbank.com/download/(.*)" nspurl="http://.*$",$a,$a_arr);
//print_r($a_arr);

?>


Excerpted from cyuyan112233’s column

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478230.htmlTechArticle1 First upload your MP3 files to Huawei network disk http://www.dbank.com/ 2 Then Share the MP3 file on the network disk http://dl.dbank.com/c03vylqaa5 3 Then replace the shared address into the $url variable...
Statement:
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