做一个某酷播放器MP3白嫖

我的博客链接https://hanbaoaaa.xyz/index.php/archives/21/k.html
先来新建html

我去找找之前的模板

脚本筛选出id:

pw= document.getElementById("input-pw").value;
    	pw=pw.replace(/[^0-9]/ig,"");
    	if(pw.length<2){
    		alert("请输入有效id或包含id的链接");
    		return;
    	}

php中请求链接

function curl_file_get_contents($durl){ 

    $ch = curl_init(); 

    curl_setopt($ch, CURLOPT_URL, $durl); 

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) ; // 获取数据返回   

    curl_setopt($ch, CURLOPT_BINARYTRANSFER, true) ; // 在启用 CURLOPT_RETURNTRANSFER 时候将获取数据返回   

    $data = curl_exec($ch); 

    curl_close($ch); 

    return $data; 

}
    
    
    //echo 'http://player.kuwo.cn/webmusic/st/getNewMuiseByRid?rid='.$_POST['rid'];
    $data1 =curl_file_get_contents('http://player.kuwo.cn/webmusic/st/getNewMuiseByRid?rid='.$_POST['rid']);
	echo explode('',explode('',$data1)[1])[0].explode('',explode('',$data1)[1])[0]
    ?>

你可能感兴趣的:(白嫖)