Download the PHP package chenjiesuper/kg without Composer

On this page you can find all versions of the php package chenjiesuper/kg. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kg

全民K歌获取歌曲信息

安装前

获取歌曲的shareid 例如 https://node.kg.qq.com/play?s=O58-ECO1_Hvq7Omg&g_f=personal 的shareid就是O58-ECO1_Hvq7Omg

安装

composer require chenjiesuper/kg

使用说明


require_once __DIR__ . '/vendor/autoload.php';
use Jay\Kg\Music;
$music = new Music();
$one = $music->getOne('O58-ECO1_Hvq7Omg');
var_dump($one);
$more = $music->getMore(array('O58-ECO1_Hvq7Omg', 'O58-ECO1_dhz6OQZ'));
var_dump($more);
/*
 * 获取单首歌曲结果如下,我们重点关注playurl 这是真实的播放地址,其他信息应该也是一目了然吧
 * 附:多首歌曲则返回二维数组 
array(5) {
    ["code"]=>
  int(0)
  ["subcode"]=>
  int(0)
  ["message"]=>
  string(0) ""
    ["default"]=>
  int(0)
  ["data"]=>
  array(49) {
        ["activity_id"]=>
    int(0)
    ["avatar"]=>
    string(50) "http://shp.qlogo.cn/ttsing/451486051/451486051/100"
        ["client_key"]=>
    string(36) "06a872c1-e306-4d7a-ab56-21a554f1123f"
        ["comment_num"]=>
    int(1)
    ["comments"]=>
    array(1) {
            [0]=>
      array(9) {
                ["avatar"]=>
        string(50) "http://shp.qlogo.cn/ttsing/451486051/451486051/100"
                ["comment_id"]=>
        string(31) "451486051_1500467860_967826_755"
                ["content"]=>
        string(15) "转发到动态"
                ["ctime"]=>
        int(1500467860)
        ["is_owner"]=>
        int(1)
        ["nick"]=>
        string(6) "海浪"
                ["reply_avatar"]=>
        string(0) ""
                ["reply_nick"]=>
        string(0) ""
                ["uid"]=>
        string(18) "66989c812d2b378e35"
      }
    }
    ["content"]=>
    string(39) "我唱了一首歌,快来听听吧。"
        ["cover"]=>
    string(84) "http://y.gtimg.cn/music/photo_new/T002R500x500M000002g6I7Z4Zg3oL.jpg?max_age=2592000"
        ["ctime"]=>
    int(1500467600)
    ["f_lat"]=>
    string(1) "0"
        ["f_lon"]=>
    string(2) "00"
        ["fb_cover"]=>
    string(84) "http://y.gtimg.cn/music/photo_new/T002R300x300M000002g6I7Z4Zg3oL.jpg?max_age=2592000"
        ["file_mid"]=>
    string(14) "004Lyjis0POIRV"
        ["flower"]=>
    array(0) {
        }
    ["flower_num"]=>
    int(0)
    ["gift_num"]=>
    int(0)
    ["hc_avatar"]=>
    string(0) ""
        ["hc_level"]=>
    int(0)
    ["hc_nick"]=>
    string(0) ""
        ["hc_second_sing_count"]=>
    int(0)
    ["hc_ugcid_half"]=>
    string(0) ""
        ["hc_uid"]=>
    string(4) "619f"
        ["iHasCp"]=>
    int(-200)
    ["is_anonymous"]=>
    int(0)
    ["is_segment"]=>
    int(0)
    ["kg_nick"]=>
    string(6) "海浪"
        ["ksong_mid"]=>
    string(14) "000Ctl2d1T0tSU"
        ["lSongMask"]=>
    int(16900)
    ["level"]=>
    int(0)
    ["mapAuth"]=>
    array(7) {
            [0]=>
      string(0) ""
            [10]=>
      string(1) "0"
            [11]=>
      string(1) "0"
            [12]=>
      string(1) "0"
            [15]=>
      string(6) "524288"
            [8]=>
      string(1) "0"
            [9]=>
      string(1) "0"
    }
    ["nick"]=>
    string(6) "海浪"
        ["photos"]=>
    array(0) {
        }
    ["play_num"]=>
    int(6)
    ["playurl"]=>
    string(477) "http://dl.stream.kg.qq.com/shkge/5a5beecccd14d8d709c7fb740caec4bea56315dc?ftnrkey=163415477c610ab7499aecf2398862c15fa1018520d118c310e8041dd25e325c51e82a1e6560801db5292531e959b52c8ad899133d749e3b3d74deed06c7a288&vkey=2963CE266CBC79C7C0DE39EAC6E1C7601D3A9688B4A672C614F6D17BB10ACD60B7ED98FC4CFB4397CF7C1E656A58BDD9AD2A715F8C27CDD76E369139D8951929479761403B442E52009B8C7A88DFC59742A5B0F4128294B8&fname=1021_33fcc2ec763ceea1547e47ef83f9a3fc6581efad.0.m4a&fromtag=1006&sdtfrom=v1006"
        ["playurl_video"]=>
    string(0) ""
        ["poi_id"]=>
    string(0) ""
        ["score"]=>
    int(4478)
    ["scoreRank"]=>
    int(5)
    ["segment_end"]=>
    int(297214)
    ["segment_start"]=>
    int(0)
    ["sentence_count"]=>
    int(49)
    ["singer_mid"]=>
    string(14) "004TXjLD41LEZI"
        ["singer_name"]=>
    string(6) "光良"
        ["song_name"]=>
    string(9) "第一次"
        ["tail_name"]=>
    string(7) "红米4"
        ["total"]=>
    int(1)
    ["ugc_id"]=>
    string(24) "451486051_1500467600_607"
        ["ugc_mask"]=>
    int(0)
    ["ugctype"]=>
    int(0)
    ["uid"]=>
    string(18) "66989c812d2b378e35"
  }
}
*/

All versions of kg with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chenjiesuper/kg contains the following files

Loading the files please wait ...