稳定、快速、免费的 API 接口服务
共收录了
14 个接口
铃声多多接口
接口地址: https://api.zdck8.com/Api/php/lsdd
返回格式: JSON
请求方式: GET
请求示例: https://api.zdck8.com/Api/php/lsdd?msg=最新&
请求参数说明:
名称 | 必填 | 说明 |
---|---|---|
msg | 否 | 最新 |
返回参数说明:
名称 | 类型 | 说明 |
---|---|---|
songimg | string | 图片 |
songer | string | 歌手名 |
songname | string | 歌曲名 |
songurl | string | 铃声链接 |
返回示例:
{ "songimg": "http://cdnuserprofilebd.shoujiduoduo.com/head_pic/08/user_head_94097795_20240617065708.jpg", "songer": "楠小兔?", "songname": "陈芯怡《青花瓷奥语混合版》~完美版", "songurl": "http://cdnringbd.shoujiduoduo.com/ringres/userv1/m96/233/315294233.mp3" }
最热
最嗨
搞笑
情感
动漫
流行
英文
默认为:最新
错误码格式说明:
名称 | 类型 | 说明 |
---|
PHP代码示例:
$get="https://api.zdck8.com/Api/php/lsdd?msg=最新&"; $result=file_get_contents($get); if($result) { //请求成功 echo $result; }else{ //请求失败 }
$url='https://api.zdck8.com/Api/php/lsdd'; $data=array( 'msg'=>'最新', ); $data=http_build_query($data); $option =array('http'=>array('method'=>'POST','content'=>$data)); $context=stream_context_create($option); $result=file_get_contents($url,false,$context); if($result) { //成功 echo $result; }else{ //失败 }
Java代码示例:
String httpurl = "https://api.zdck8.com/Api/php/lsdd?msg=最新&"; HttpURLConnection connection = null; InputStream is = null; BufferedReader br = null; String result = null; try { URL url = new URL(httpurl); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setConnectTimeout(15000); connection.setReadTimeout(60000); connection.connect(); if (connection.getResponseCode() == 200) { is = connection.getInputStream(); br = new BufferedReader(new InputStreamReader(is, "UTF-8")); StringBuffer sbf = new StringBuffer(); String temp = null; while ((temp = br.readLine()) != null) { sbf.append(temp); } result = sbf.toString(); } } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { if (null != br) { try { br.close(); } catch (IOException e) { e.printStackTrace(); } } if (null != is) { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } connection.disconnect(); } System.out.println(result);//返回内容
PrintWriter out = null; BufferedReader in = null; String result = ""; String param ="msg=最新&"; String url ="https://api.zdck8.com/Api/php/lsdd?"; try { URL realUrl = new URL(url); URLConnection conn = realUrl.openConnection(); conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); conn.setDoOutput(true); conn.setDoInput(true); out = new PrintWriter(conn.getOutputStream()); out.print(param); out.flush(); in = new BufferedReader( new InputStreamReader(conn.getInputStream())); String line; while ((line = in.readLine()) != null) { result += line; } } catch (Exception e) { System.out.println("发送 POST 请求出现异常!"+e); e.printStackTrace(); } finally{ try{ if(out!=null){ out.close(); } if(in!=null){ in.close(); } } catch(IOException ex){ ex.printStackTrace(); } } System.out.println(result);//返回内容
JavaScript代码示例:
var url = "https://api.zdck8.com/Api/php/lsdd?msg=最新&" var xhrGet = new XMLHttpRequest(); xhrGet.open('GET',url, true); xhrGet.send(); xhrGet.onreadystatechange = function() { if (xhrGet.readyState == 4 && xhrGet.status == 200) { //成功 var result = xhrGet.responseText; console.log(result); } else { //失败 } }
var url ="https://api.zdck8.com/Api/php/lsdd"; var data = "msg=最新&"; var xhrPost = new XMLHttpRequest(); xhrPost.open('POST', url, true); xhrPost.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhrPost.send(data); xhrPost.onreadystatechange = function() { if (xhrPost.readyState == 4 && xhrPost.status == 200) { //成功 var result = xhrPost.responseText; console.log(result); } else { //失败 } }