Pages

Saturday, 20 July 2024

NeteaseCloudMusic-php

 php版的网易云音乐.

2.x特性

  • 简洁清新的扁平设计
  • 支持歌词显示
  • 动态改变URL,方便分享
  • HTTPS支持
  • 动态改变标题
  • 更完善的下载音乐方式
  • 支持播放付费音乐
  • 海外区域支持
  • 手机版面支持良好
  • 顺序、随机、单曲循环播放 【2.1.x支持】
  • 多专辑无缝专辑切换 【2.3.x支持】

1.x

1.x特性:

  • 高斯模糊的播放器效果
  • 顺序、随机、单曲循环播放
  • 支持歌词显示
  • 列表分享链接
  • 单曲分享链接
  • 下载音乐
  • 支持播放付费音乐
  • 海外区域支持

音乐列表添加方式:

下载解压后,找到player.json,根据现有格式修改。

目前暂时只支持播放一个音乐列表,2.3.x版本将支持多专辑切换

感谢 草莓ICON 提供精致的图标

感谢 Meting 提供的新版网易云音乐接口实现.

from https://github.com/Tokinx/NeteaseCloudMusic-php/tree/master 

(fork version: https://github.com/ihewro/NeteaseMusicWebsiteShow)

---------------------------------------------------------------------------------------

Wow, such a powerful music API framework

Introduction

A powerful music API framework to accelerate your development

  • Elegant - Easy to use, a standardized format for all music platforms.
  • Lightweight - A single-file library that's less than 51KB.
  • Powerful - Support various music platforms, including Tencent, NetEase, Xiami, KuGou, Baidu, Kuwo and more.
  • Free - Under MIT license, need I say more?

Requirement

PHP 5.4+ and BCMath, Curl, OpenSSL extension installed.

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require metowolf/meting

Then you can import the class into your application:

use Metowolf\Meting;

$api = new Meting('netease');

$data = $api->format(true)->search('Soldier');

Note: Meting requires BCMath, cURL and OpenSSL extension in order to work.

Quick Start

require 'vendor/autoload.php';
// require 'Meting.php';

use Metowolf\Meting;

// Initialize to netease API
$api = new Meting('netease');

// Use custom cookie (option)
// $api->cookie('paste your cookie');

// Get data
$data = $api->format(true)->search('Soldier', [
    'page' => 1,
    'limit' => 50
]);

echo $data;
// [{"id":35847388,"name":"Hello","artist":["Adele"],"album":"Hello","pic_id":"1407374890649284","url_id":35847388,"lyric_id":35847388,"source":"netease"},{"id":33211676,"name":"Hello","artist":["OMFG"],"album":"Hello",...

// Parse link
$data = $api->format(true)->url(35847388);

echo $data;
// {"url":"http:\/\/...","size":4729252,"br":128}

More usage

Join the Discussion

Related Projects

Author

Meting © metowolf, Released under the MIT License.

Blog @meto · GitHub @metowolf ·

from  https://github.com/metowolf/Meting

 

 

 

 

No comments:

Post a Comment