Skip to content

mpd-php is a php library for controlling a mpd server

License

Notifications You must be signed in to change notification settings

jpaffrath/mpd-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpd-php

mpd-php is a php library for controlling a mpd server.

Usage

Import mpd.php in your web project:

include 'mpd.php';

Configure the connection settings and connect to a mpd server:

$mpd = new mpd('127.0.0.1', 6600);

if ($mpd->connect()) {
    alert("Connected!");
}

Control server playback:

$mpd->play($songnr);
$mpd->stop();
$mpd->resume();

$mpd->next();
$mpd->previous();

$mpd->clear();

Get database informations:

$mpd->getArtistnames();
$mpd->getAlbumnamesFromArtist($artist);

$mpd->isPlaying();

Control playlists:

$mpd->listPlaylists();
$mpd->listPlaylist($playlist);

$mpd->getCurrentSong();
$mpd->loadPlaylist($playlist)();

Disconnect from server:

$mpd->disconnect();

About

mpd-php is a php library for controlling a mpd server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages