Heim  >  Artikel  >  Backend-Entwicklung  >  php免费接口API 分享 各大效能

php免费接口API 分享 各大效能

WBOY
WBOYOriginal
2016-06-13 11:57:571515Durchsuche

php免费接口API 分享 各大功能
天气接口

  • 气象局接口:
    http://m.weather.com.cn/data/101010100.html 解析 用例

    音乐接口

    • 虾米接口
      http://kuang.xiami.com/app/nineteen/search/key/歌曲名称/diandian/1/page/歌曲当前页?_=当前毫秒&callback=getXiamiData用例 代码解释和下载
    • QQ空间音乐接口
      http://qzone-music.qq.com/fcg-bin/cgi_playlist_xml.fcg?uin=QQ号码&json=1&g_tk=1916754934用例代码解释和下载
    • QQ空间收藏音乐接口
      http://qzone-music.qq.com/fcg-bin/fcg_music_fav_getinfo.fcg?dirinfo=0&dirid=1&uin=QQ号&p=0.519638272547262&g_tk=1284234856

      地图接口

      • 阿里云根据地区名获取经纬度接口
        http://gc.ditu.aliyun.com/geocoding?a=苏州市 官方文档
        参数解释: 纬度,经度 type 001 (100代表道路,010代表POI,001代表门址,111可以同时显示前三项)
      • 阿里云根据经纬度获取地区名接口
        http://gc.ditu.aliyun.com/regeocoding?l=39.938133,116.395739&type=001 官方文档

        IP接口

        • 新浪接口(ip值为空的时候 获取本地的)
          http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip=218.4.255.255
        • 淘宝接口
          http://ip.taobao.com/service/getIpInfo.php?ip=63.223.108.42

          手机信息查询接口

          • 淘宝网接口
            http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=手机号
          • 拍拍接口
            http://virtual.paipai.com/extinfo/GetMobileProductInfo?mobile=手机号&amount=10000&callname=getPhoneNumInfoExtCallback用例
          • 百付宝接口
            https://www.baifubao.com/callback?cmd=1059&callback=phone&phone=手机号
          • 115接口
            http://cz.115.com/?ct=index&ac=get_mobile_local&callback=jsonp1333962541001&mobile=手机号
          • 有道接口
            http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=mobile&q=手机号
          • 手机在线接口
            http://api.showji.com/Locating/www.showji.com.aspx?m=手机号&output=json&callback=querycallback
            http://tech.sina.com.cn/down/baishitong/mobile.html?code=

            视频信息接口

            • 优酷
              http://v.youku.com/player/getPlayList/VideoIDS/视频ID (比如 http://v.youku.com/v_show/id_XNTQxNzc4ODg0.html的ID就是XNTQxNzc4ODg0)

              翻译、词典接口

              • 腾讯
                http://dict.qq.com/dict?q=词语

                2012-12-20 10:11

                PHP 手机号码归属地查询api接口


                淘宝网

                API地址: http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=15850781443
                参数:

                • tel:手机号码

                • 返回:JSON

                拍拍

                API地址: http://virtual.paipai.com/extinfo/GetMobileProductInfo?mobile=15850781443&amount=10000&callname=getPhoneNumInfoExtCallback
                参数:

                • mobile:手机号码

                • callname:回调函数

                • amount:未知(必须)

                • 返回:JSON

                财付通

                API地址: http://life.tenpay.com/cgi-bin/mobile/MobileQueryAttribution.cgi?chgmobile=15850781443
                参数:

                • chgmobile:手机号码

                • 返回:xml

                百付宝

                API地址: https://www.baifubao.com/callback?cmd=1059&callback=phone&phone=15850781443
                参数:

                • phone:手机号码

                • callback:回调函数

                • cmd:未知(必须)

                • 返回:JSON

                115

                API地址: http://cz.115.com/?ct=index&ac=get_mobile_local&callback=jsonp1333962541001&mobile=15850781443
                参数:

                • mobile:手机号码

                • callback:回调函数

                • 返回:JSON


                有道api接口
                接口地址:http://www.youdao.com/smartresult-xml/search.s?type=mobile&q=13892101112

                参数说明:

                • type : 参数手机归属地固定为mobile

                • q : 手机号码

                返回XML格式:




                13892101112
                陕西延安

                或者

                http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=mobile&q=手机号码

                返回JSON格式:

                fYodaoCallBack(1, {‘product’:'mobile’,'phonenum’:’13892101112′,’location’:'陕西 延安’} , ”);



                举例:

                $mobile = "15018788111";  //要查询的电话号码
                $content = get_mobile_area($mobile);
                print_r($content);

                function get_mobile_area($mobile){
                    $sms = array('province'=>'', 'supplier'=>'');    //初始化变量
                    //根据淘宝的数据库调用返回值
                    $url = "http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=".$mobile."&t=".time(); 
                   
                    $content = file_get_contents($url);
                    $sms['province'] = substr($content, "56", "4");  //截取字符串
                    $sms['supplier'] = substr($content, "81", "4");
                    return $sms;
                }

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:ThinkPHP做的网站,在后盾编辑视频后出现Fatal error: Cannot redeclare class Think inNächster Artikel:php和sql有关问题

In Verbindung stehende Artikel

Mehr sehen