Code Monkey home page Code Monkey logo

shoutcast-php's Introduction

shoutcast-php

Retrieve track artist, title and artwork from a Shoutcast server.

##Config

Before you use shoutcast-php you will need to fill in your config.json file with the correct information.

The shoutcast URL will need to include the port as well, such as http://example.com:8000. Most Shoutcast servers use stream ID 1 as the default so shoutcast_stream is set to that as default.

You will need to register with the last.fm API before you begin using shoutcast-php. Once you have done that you can fill in your last_fm_api_key and last_fm_api_secret.

{
	"settings": {
		"shoutcast_url": "",  
		"shoutcast_stream": 1,  
		"last_fm_api_key": "",  
		"last_fm_api_secret": ""  
	}  
}

Usage

After you have done that all you need to do is copy these files to your web server as they are and then access shoutcast.php as you need to do so.

I would recommend using an AJAX call to fetch the output from shoutcast.php once every 5 seconds or so, and then parsing that as you wish.

If everything is working you should see something similar to the following:

{"artist":"Mass Effect","track":"A Rude Awakening","artwork":"https:\/\/lastfm-img2.akamaized.net\/i\/u\/97f596f9dace42b98269627eb35750c1.png"}

shoutcast-php's People

Contributors

forceh91 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.