PHP code example of daryl / php-aplayer
1. Go to this page and download the library: Download daryl/php-aplayer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
daryl / php-aplayer example snippets
$aplayer = new Aplayer\Aplayer();
$aplayer->out();
Aplayer::setSong($songId); //Id of the netease music, default 22817183, one of my favirote music.
Aplayer::setPlaylist($playlistId); //Id of the netease music, default 476998713, one of my favirote playlist.
Aplayer::setSongType('song' or 'playlist') //To choose song or playlist.
Aplayer::setElementId($elementId) //To set the id of the aplayer element, default player1.
bash
composer