从千千静听服务器获取的lrc歌词
程序员文章站
2022-03-16 16:38:58
...
从千千静听服务器获取的lrc歌词的PHP代码 无 源码与演示: 源码出处演示出处 ?phperror_reporting(0);function ConvertUrlEncode($text){$textUrl = htmlspecialchars(urlencode($text));return $textUrl;}$Type=substr($name,-4);$name1=str_replace($Type,"
从千千静听服务器获取的lrc歌词的PHP代码源码与演示:源码出处 演示出处
(.*?)/is',$str, $arr); foreach ($arr[1] as $k => $v){ } if($v){ echo $v; }else{ echo '很抱歉,百度都没找到'.$name.'的歌词,这歌曲也太给力了吧~!'; } ?>
//转载请注明出处 uenucom function SingleDecToHex($dec) { $tmp=""; $dec=$dec%16; if($dec=0 && bccomp($tp,2147483648)>0) $tp=bcadd($tp,-4294967296); if(bccomp($num,0)> 8; //右移8位后为0x0000015F //tmp1 0x0000005F if ( ($Id & 0x00FF0000) == 0 ) { $tmp3 = 0x000000FF & ~$tmp1; //CL 0x000000E7 } else { $tmp3 = 0x000000FF & (($Id & 0x00FF0000) >> 16); //右移16位后为0x00000001 } $tmp3 = $tmp3 | ((0x000000FF & $Id) > 24)); //右移24位后为0x00000000 } $i=$length-1; while($i >= 0){ $char = $song[$i]; if($char >= 0x80) $char = $char - 0x100; $tmp1 = ($char + $tmp2) & 0x00000000FFFFFFFF; $tmp2 = ($tmp2 = 128) $char = $char - 256; $tmp7 = ($char + $tmp1) & 0x00000000FFFFFFFF; $tmp1 = ($tmp1 0) $t = bcadd($t ,- 4294967296); return $t;} $artist="央金兰泽"; $title="遇上你是我的缘"; $doc = new DOMDocument(); $doc->load("http://lrccnc.ttplayer.com/dll/lyricsvr.dll?sh?Artist=".qianqian_code($artist)."&Title=".qianqian_code($title)."&Flags=0"); $lrcNode = $doc->getElementsByTagName("lrc"); foreach($lrcNode as $lrc) { $id=$lrc->getAttribute("id"); $artist=iconv('UTF-8','GBK',$lrc->getAttribute("artist")); $title=iconv('UTF-8','GBK',$lrc->getAttribute("title")); $code=CodeFunc($id,$artist,$title); $lrcstr=iconv('UTF-8','GBK',file_get_contents("http://lrccnc.ttplayer.com/dll/lyricsvr.dll?dl?Id=".$id."&Code=".$code)); echo $lrcstr; break; } ?>
上一篇: php批量转换Mysql表引擎
下一篇: 微信扫码支付模式二回调怎么处理?