![]() |
Open Music Source Code Package & Web Service Manual (Ver 1.4 / Last Changed: 1-Jan-2008) |
Welcome to Open Music Source!
This document should help you with installing the OMS codes and get it running on your server to integrate our content into your website.
We, the OMS developers, thank you for choosing our software and hope you find it useful in all your endeavors.
This document should help you with installing the OMS codes and get it running on your server to integrate our content into your website.
We, the OMS developers, thank you for choosing our software and hope you find it useful in all your endeavors.
- 1. Getting Started
- 2. The Web Service Functions
- 2.1.1 GetArtist
- 2.1.2 GetArtistArticle
- 2.1.3 GetArtistConcerts
- 2.1.4 GetArtistList
- 2.1.5 GetArtistRadio
- 2.1.6 GetArtistRating
- 2.1.7 GetArtistReviews
- 2.1.8 GetArtistSongs
- 2.1.9 GetBandMembers
- 2.2.1 GetConcert
- 2.2.2 GetConcertList
- 2.2.3 GetSong
- 2.2.4 GetSongArticle
- 2.2.5 GetSongCharts
- 2.2.6 GetSongList
- 2.2.7 IsArtistMyPayingCustomer
- 2.2.8 SendEmailToArtist
- 2.2.9 GetArtistIDByURL
- 3. Common PHP and Web Service Functions
- 4. Javascript Functions
- 5. Appendix
- 6. Troubleshooting
1. Getting Started
1.1 Package content
Files inside the archive:
- inc/4.3.10/functions.php
- inc/4.3.10/oms_xlm_library.php
- inc/5.1.2/functions.php
- inc/5.1.2/oms_xlm_library.php
- inc/config.php
- inc/nusoap/lgpl.txt
- inc/nusoap/nusoap.php
- inc/nusoap/README.txt
- minimal_code/get_artist.php
- minimal_code/get_artist_article.php
- minimal_code/get_artist_concerts.php
- minimal_code/get_artist_list.php
- minimal_code/get_artist_radio.php
- minimal_code/get_artist_rating.php
- minimal_code/get_artist_reviews.php
- minimal_code/get_artist_songs
- minimal_code/get_band_members.php
- minimal_code/get_concert.php
- minimal_code/get_concert_list.php
- minimal_code/get_song.php
- minimal_code/get_song_article.php
- minimal_code/get_song_charts.php
- minimal_code/get_song_list.php
- minimal_code/is_artist_my_paying_customer.php
- minimal_code/send_email_to_artist.php
...about the files and folders:
The blue colored files represent the Web Service functions where we included code comments and example output. These codes will work right away when executed (on your server or localy with an apache installed) as they are prepared and provided with all required elements. We picked example artist- or genre IDs from our database if it was required for the function. These files are also linked from within this manual for demonstration and source code viewing.For the more advanced programmers we included the same Web Services functions as mininal code versions which are completely free of example values and comments.
The folder 'inc' contains required files which need to be included to execute the OMS Web Services. The folder '4.3.10' and '5.1.2' contain PHP version specific files, so the OMS Web Services will run on servers where PHP4 or PHP5 is installed. Which of those folders is used depends on the PHP version installed on your system/server and is decided automatically by the PHP version check function in the file config.php.
The file inc/config.php must be included in each file where you use the OMS Web Services as it contains your login and password to the Open Music Source database. If you haven't modified this file yet it will contain the login and password to the demo database and no domain information. You will need to modify this file as described in your OMS Registration E-Mail.
1.2 Installation
- Register your platform/label account
- Download the code package and extract to a folder on your harddrive
- Open the file /inc/config.php with a code-/text editor of your choice
- Modify the file by inserting: your login, your password and your domain name (see also the E-Mail you got from us after registration)
- Upload the complete folder to your server, preserving the given folder structure
1.3 Understanding the basics
First of all you should have a look at a more simple function to understand the basics of executing a OMS Web Service. Please open the source code of get_artist.php. Note that we are using a "blue colored" file from the code package (see above for the meaning of colors).
Let's have a look at the complete source code, step by step (make sure to read the inserted comment boxes carefully).
<?
/************************************************************************
*
* OMS Web Service Functions 1.3
* -----------------------------
*
* Copyright: (C) 2006 moving primates GmbH
* Function: GetArtist
* Description: Gets the basic artist data of one artist.
* Change Date: 28/Feb/2006
*
************************************************************************* | ↑ The first lines of the PHP document telling some description about the function. You will find in every example document. |
* REQUIRED ELEMENTS:
*
* The following elements must be send with the request:
*
* - ArtistID
* - Fieldlist | ↑ Tells you about the required elements of the Web Service. Note that at least one required element applies for every Web Service function, here it's two of them: ArtistID and Fieldlist. ArtistID: As get_artist is a function which gets the data from one specific artist, it is required to set from which artist to get the data. This is done with the required element ArtistID as all artists (as well as songs, reviews, et cetera) are assigned to one unique identifier. Fieldlist: Fieldlist makes it possible to request your own selection of elements from the Web Services. For example you would like to request ArtistName and ArtistGenreName but you do not need PostalCode, City or CountryName, so you can leave it out of the request. The Fieldlist must contain at least one Field Element as a child element. You will find more information about the elements (in fact there is a third) later on in this manual. |
* FIELD ELEMENTES:
*
* The following are Field elements which define what you get back from
* the Web Service function. They must be named "Field", their value
* must be the exact name of the following enumeration and they must be
* created as a child element of "Fieldlist".
*
* Field elements are optional, however it is required that you
* create at least one; their send order is irrelevant.
*
* - ArtistName
* - ArtistURL
* - Website
* - MusicalInfluence
* - SoundsLike
* - ArtistPictureExists
* - FirstOnlineDate
* - PostalCode
* - City
* - CountryID
* - CountryCode
* - CountryName
* - ArtistGenreID
* - ArtistGenreParentID
* - ArtistGenreTopParentID
* - ArtistGenreName
* - ArtistParentGenreName
* - ArtistTopParentGenreName
| ↑ The list of Field Elements which can be requested for this OMS Web Service. You will find this list inside the function's comments whenever Fieldlist is part of the list of required elements which is not always the case as some Web Services just get you a small ammount of data for which it would not make sense to use Field Elements. Enough with the comments now, let's get to the action! |
$ArtistID = "42028"; // Example ID from an artist | ↑ As previously mentioned, ArtistID is a required element for this Web Service function, therefore we declare this example ID. |
include("inc/config.php"); // Example path, point it to your config.php | ↑ Including the file config.php using the default path, look under package content for details of that file. |
$dom = create_document();
$root = create_root_element($dom, "OMS");
create_element_attribute($root, "xmlns", $oms_cfg['artist_data_xmlns'] . "/GetArtist");
| ↑ Defines the path to the XSD files for the Web Services. In our example codes (and the minimal code) we already inserted the correct path so don't change anything here. The XSDs are available at http://xmlns.openmusicsource.net/1.3 You might find them useful when you advance working with the OMS codes as you can see many things at a glance. |
// Here we are defining the FIELDLIST elements (requesting all available)
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistName");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistURL");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "Website");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "MusicalInfluence");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "SoundsLike");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistPictureExists");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "FirstOnlineDate");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "PostalCode");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "City");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "CountryID");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "CountryCode");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "CountryName");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistGenreID");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistGenreParentID");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistGenreTopParentID");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistGenreName");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistParentGenreName");
add_child_element($el_fields_list, $el_field);
$el_field = create_element($dom, "Field");
set_element_value($dom, $el_field, "ArtistTopParentGenreName");
add_child_element($el_fields_list, $el_field); | ↑ Definition of the Field elements for Fieldlist. In all of our example codes files we request all available Field elements. Which fields are going to be requested depends on your descision of what would make sense on your website. If you don't need a Field element you can simply leave it out by deleting the (3) lines of code. For example you don't need the country name of the artist, so delete the lines: $el_field = create_element($dom, "Field"); set_element_value($dom, $el_field, "CountryName"); add_child_element($el_fields_list, $el_field); The procedure for each element is always the same: the first line creates an element, the second line declares its value and the third line adds it to the Fieldlist as a child element. |
// Preparing the XML which is going to be send
add_child_element($root, $el_artist_id);
add_child_element($root, $el_fields_list);
$xml_str = dump_to_string($dom);
$par = array("String_1" => $oms_cfg['ws_login'],
"String_2" => $oms_cfg['ws_password'],
"String_3" => $xml_str ); | ↑ Before calling the Web Service function GetArtist we need to put all created elements together with your login and password into an array ($par). |
// Executing the Web Service function "GetArtist"
$GetArtist = ProcessWSCall($oms_cfg['artist_data_ws_url'], "GetArtist", $par, $oms_cfg['artist_data_xmlns']); | ↑ Here we execute the Web Service function GetArtist and put the array we get back into $GetArtist. We now have the data we requested and can read it out the way we want on our website. Have a look in the example codes, we created the code for variable assignment and output there already. |
| Finally let's have a look on the structure of the code. ↓ |
1.4 The three elements: Required, Field, Filter
Beside the required elements (ArtistID and Fieldlist) and the field elements (ArtistName, Website, et cetera), there is another type of element which hasn't been covered in 1.3. It called filter element and you will find it in functions where there's a lot of data coming back and sorting/filtering makes sense. See GetArtistList for example - this function searches the complete OMS artist catalogue. You can use various filter elements to limit the output by genres, postal codes, countries and so on.
So again, envision the following:
- Required elements are those you need to define and send with your request in order to execute an OMS Web Service function.
- Field elements are child elements of the element Fieldlist, at least one of them must be created. They define what the function should get from the database.
- Filter elements can narrow down the request and therefore limit the output. They are part of those functions which request a lot of data.
2. The Web Service Functions
2.1.1 GetArtist
Execute this function | View the source code
This function gets the basic information about one artist at a time. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- ArtistName: Name of the artist.
- ArtistURL: Short URL entered by the artist. It redirect www.yourdomain.com/ArtistURL to the artist's page on your website.
- Website: Homepage address by the artist.
- MusicalInfluence: Musical influences of the artist.
- SoundsLike: Other artists which sound similar.
- ArtistPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- FirstOnlineDate: Date when the artist was set online for the first time.
- City: City of residece.
- PostalCode: Postal code of residence.
- CountryID: Country ID of residence. (see also: 5.1 Country List)
- CountryCode: Country code of residence.
- CountryName: Country name of residence.
- ArtistGenreID: Genre ID from the selected genre of the artist. (see also: 5.2 Genre List)
- ArtistGenreParentID: Parent genre ID of the artist.
- ArtistGenreTopParentID: Top parent genre ID of the artist.
- ArtistGenreName: Genre name of the artist.
- ArtistParentGenreName: Parent genre name of the artist.
- ArtistTopParentGenreName: Top parent genre name of the artist.
2.1.2 GetArtistArticle
Execute this function | View the source code
Gets the artist description, history, press news and additional info texts of one artist. It's possible to request the artist info in different languages if those are available.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
- ArticleType: Must be "Description", "History", "Press" or "AdditionalInfo".
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- ArticleText: Text of the article.
- ArticleLanguageID: Language ID of the article.
- ArticleLanguageCode: Language code of the article.
- ArticleLanguageName: Language name of the article.
These are the available filter elements for this function:
- LanguageCode: Must be "de" for German, "en" for English language or left blank for all languages. More languages coming soon!
2.1.3 GetArtistConcerts
Execute this function | View the source code
This function gets all concert dates of one artist and its related concert information. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- ConcertID: Unique identifier of the concert entry.
- ConcertVenue: Name of the venue where the concert takes place.
- ConcertStreet: Street of the venue where the concert takes place.
- ConcertCity: City of the venue where the concert takes place.
- ConcertPostalCode: Postal code of the venue where the concert takes place.
- ConcertCountryID: Country ID of the venue where the concert takes place. (see also: 5.1 Country List)
- ConcertCountryCode: Country code of the venue where the concert takes place.
- ConcertCountryName: Country name of the venue where the concert takes place.
- ConcertDate: Date when the concert takes place.
- ConcertPrice: Price of the concert.
- CurrencyID: Currency ID of the concert price.
- CurrencyCode: Currency code of the concert price.
- CurrencyName: Currency name of the concert price.
- TicketsViaPhone: Phone number for ticket order / concert information.
- TicketsViaInternet: URL for ticket order / concert information.
- TicketsViaEmail: Email address for ticket order / concert information.
- ConcertAdditionalInfo: Genre name of the artist.
2.1.4 GetArtistList
Execute this function | View the source code
This function gets the basic information about all OMS artists which are online and included inside your artist pool. You can set various filter for this function to filter and limit the output.
These are the required elements for this function:
- Page: Numeric value which defines the number of page you are getting back.
- Pagesize: Numeric value which defines the number of entries per page.
- OrderBy: Must be "ArtistName" (list is ordered alphabetical by artist name) "FirstOnlineDate" (list is ordered by date when the artist was set online for the first time).
- SortOrder: Must be "ASC" (ascending list) or "DESC" (descending list).
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- ArtistID: ID of the artist.
- ArtistName: Name of the artist.
- ArtistURL: Short URL entered by the artist. It redirect www.yourdomain.com/ArtistURL to the artist's page on your website.
- Website: Homepage address by the artist.
- MusicalInfluence: Musical influences of the artist.
- SoundsLike: Other artists which sound similar.
- ArtistPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- FirstOnlineDate: Date when the artist was set online for the first time.
- PostalCode: Postal code of residence.
- City: City of residece.
- CountryID: Country ID of residence. (see also: 5.1 Country List)
- CountryCode: Country code of residence.
- CountryName: Country name of residence.
- ArtistGenreID: Genre ID from the selected genre of the artist. (see also: 5.2 Genre List)
- ArtistGenreParentID: Parent genre ID of the artist.
- ArtistGenreTopParentID: Top parent genre ID of the artist.
- ArtistGenreName: Genre name of the artist.
- ArtistParentGenreName: Parent genre name of the artist.
- ArtistTopParentGenreName: Top parent genre name of the artist.
These are the available filter elements for this function:
- GenreID: Must be a numeric and existing Genre ID or 0 for no filtering.
- CountryID: Must be a numeric and existing Country ID or 0 for no filtering.
- City: The letter(s) or number(s) the city name of the artist must start with, contain or be equal with (depending on SearchType).
- CitySearchType: Must be "StartsWith" (City must start with searched string), "Contains" (City must contain searched string) or "Equals" (City must equal searched string).
- PostalCode: The letter(s) or number(s) the postal code of the artist must start with, contain or be equal with (depending on SearchType).
- PostalCodeSearchType: Must be "StartsWith" (Postal code must start with searched string), "Contains" (Postal code must contain searched string) or "Equals" (Postal code must equal searched string).
- ArtistName: The letter(s) or number(s) the name of the artist must start with, contain or be equal with (depending on SearchType).
- ArtistNameSearchType: Must be "StartsWith" (Artist name must start with searched string), "Contains" (Artist name must contain searched string) or "Equals" (Artist name must equal searched string).
2.1.5 GetArtistRadio
Execute this function | View the source code
This function will tell you if a lofi-/hifi-stream of MP3s from an artist is available. The artist account must be online and exist in your artist pool for this function to get any data.
This is the only required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
2.1.6 GetArtistRating
Execute this function | View the source code
This function gets the rating score which has been stored for this artist. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
- UserID: Should be read out from cookie to prevent double rating.
2.1.7 GetArtistReviews
Execute this function | View the source code
This function gets all reviews and related information of one artist. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
- Page: Numeric value which defines the number of page you are getting back.
- Pagesize: Numeric value which defines the number of entries per page.
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- ReviewFirstName: First name of the reviewer.
- ReviewLastName: Last name of the reviewer.
- ReviewEmail: Email address of the reviewer.
- ReviewText: Review text.
- ReviewDate: Date the review has been send in.
2.1.8 GetArtistSongs
Execute this function | View the source code
Gets the data of all uploaded songs of one artist. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- Mp3ID: Unique identifier of the song.
- SongTitle: Title of the song.
- Composer: Composer of the song.
- LyricsAuthor: Author name of the song's lyrics.
- Distribution: Name of song's distributor.
- PerformingRightsOrganization: Name of the performing rights organization this song is assigned to.
- PerformingRightsOrganizationID: ID of the performing rights organization this song is assigned to.
- OtherPerformingRightsOrganization: Name of the performing rights organization this song is assigned to and which has not been added yet the OMS database.
- SongPrice: Price of the song.
- Year: Year of creation.
- SongLabel: Label the song is assigned to.
- SongPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- SongLyrics: Song lyrics.
- LoFiExists: "1" if a lofi stream is available for this song, else "0".
- HiFiExists: "1" if a hifi stream is available for this song, else "0".
- DownloadExists: "1" if downloading this song is possible, else "0".
- FileSize: Size of the MP3 file in Megabyte.
- UploadDate: Date when the song has been uploaded.
- SongGenreID: Genre ID from the selected genre of the song. (see also: 5.2 Genre List)
- SongGenreParentID: Genre ID from the parent genre of the song.
- SongGenreTopParentID: Genre ID from the top parent genre of the song.
- SongGenreName: Name from the genre of the song.
- SongParentGenreName: Name from the parent genre of the song.
- SongTopParentGenreName: Name from the top parent genre of the song.
- PlayChartGenrePos: Position in the play-charts in the genre of this song.
- PlayChartParentGenrePos: Position in the play-charts in the parent genre of this song.
- PlayChartTopParentGenrePos: Position in the play-charts in the top parent genre of this song.
- PlayChartAllGenresPos: Position in the overall play-charts of this song.
- DownloadChartGenrePos: Position in the download-charts in the genre of this song.
- DownloadChartParentGenrePos: Position in the download-charts in the parent genre of this song.
- DownloadChartTopParentGenrePos: Position in the download-charts in the top parent genre of this song.
- DownloadChartAllGenresPos: Position in the download-charts in the top parent genre of this song.
2.1.9 GetBandMembers
Execute this function | View the source code
Gets the data of all entered bandmembers of one artist. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- MemberName: Name of the member of band.
- MemberInstrument: Instrument played by the member of band.
- MemberEmail: Email address of the member of band.
2.2.1 GetConcert
Execute this function | View the source code
This function gets the data from one concert date entry and the basic info of the related artist. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ConcertID: Unique identifier of the concert entry.
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- ConcertVenue: Name of the venue where the concert takes place.
- ConcertStreet: Street of the venue where the concert takes place.
- ConcertCity: City of the venue where the concert takes place.
- ConcertPostalCode: Postal code of the venue where the concert takes place.
- ConcertCountryID: Country ID of the venue where the concert takes place. (see also: 5.1 Country List)
- ConcertCountryCode: Country code of the venue where the concert takes place.
- ConcertCountryName: Country name of the venue where the concert takes place.
- ConcertDate: Date when the concert takes place.
- ConcertPrice: Price of the concert.
- CurrencyID: Currency ID of the concert price.
- CurrencyCode: Currency code of the concert price.
- CurrencyName: Currency name of the concert price.
- TicketsViaPhone: Phone number for ticket order / concert information.
- TicketsViaInternet: URL for ticket order / concert information.
- TicketsViaEmail: Email address for ticket order / concert information.
- ConcertAdditionalInfo: Genre name of the artist.
- ArtistID: ID of the artist.
- ArtistName: Name of the artist.
- ArtistURL: Short URL entered by the artist. It redirect www.yourdomain.com/ArtistURL to the artist's page on your website.
- Website: Homepage address by the artist.
- MusicalInfluence: Musical influences of the artist.
- SoundsLike: Other artists which sound similar.
- ArtistPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- FirstOnlineDate: Date when the artist was set online for the first time.
- City: City of residece.
- PostalCode: Postal code of residence.
- CountryID: Country ID of residence. (see also: 5.1 Country List)
- CountryCode: Country code of residence.
- CountryName: Country name of residence.
- ArtistGenreID: Genre ID from the selected genre of the artist. (see also: 5.2 Genre List)
- ArtistGenreParentID: Parent genre ID of the artist.
- ArtistGenreTopParentID: Top parent genre ID of the artist.
- ArtistGenreName: Genre name of the artist.
- ArtistParentGenreName: Parent genre name of the artist.
- ArtistTopParentGenreName: Top parent genre name of the artist.
2.2.2 GetConcertList
Execute this function | View the source code
This function gets the data from all concerts available in the OMS database. Additionally it gets the basic data from the related artist. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- Page: Numeric value which defines the number of page you are getting back.
- Pagesize: Numeric value which defines the number of entries per page.
- OrderBy: Must be "ConcertDate" (order list by date of concert), "ConcertCity" (order list alphabetically by city name), "ConcertVenue" (order list alphabetically by venue name), "ArtistName" (order list alphabetically by artist name).
- SortOrder: Must be "ASC" (ascending list) or "DESC" (descending list).
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- ConcertID: Unique identifier of the concert entry.
- ConcertVenue: Name of the venue where the concert takes place.
- ConcertStreet: Street of the venue where the concert takes place.
- ConcertCity: City of the venue where the concert takes place.
- ConcertPostalCode: Postal code of the venue where the concert takes place.
- ConcertCountryID: Country ID of the venue where the concert takes place. (see also: 5.1 Country List)
- ConcertCountryCode: Country code of the venue where the concert takes place.
- ConcertCountryName: Country name of the venue where the concert takes place.
- ConcertDate: Date when the concert takes place.
- ConcertPrice: Price of the concert.
- CurrencyID: Currency ID of the concert price.
- CurrencyCode: Currency code of the concert price.
- CurrencyName: Currency name of the concert price.
- TicketsViaPhone: Phone number for ticket order / concert information.
- TicketsViaInternet: URL for ticket order / concert information.
- TicketsViaEmail: Email address for ticket order / concert information.
- ConcertAdditionalInfo: Genre name of the artist.
- ArtistID: ID of the artist.
- ArtistName: Name of the artist.
- ArtistURL: Short URL entered by the artist. It redirect www.yourdomain.com/ArtistURL to the artist's page on your website.
- Website: Homepage address by the artist.
- MusicalInfluence: Musical influences of the artist.
- SoundsLike: Other artists which sound similar.
- ArtistPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- FirstOnlineDate: Date when the artist was set online for the first time.
- City: City of residece.
- PostalCode: Postal code of residence.
- CountryID: Country ID of residence. (see also: 5.1 Country List)
- CountryCode: Country code of residence.
- CountryName: Country name of residence.
- ArtistGenreID: Genre ID from the selected genre of the artist. (see also: 5.2 Genre List)
- ArtistGenreParentID: Parent genre ID of the artist.
- ArtistGenreTopParentID: Top parent genre ID of the artist.
- ArtistGenreName: Genre name of the artist.
- ArtistParentGenreName: Parent genre name of the artist.
- ArtistTopParentGenreName: Top parent genre name of the artist.
These are the available filter elements for this function:
- ArtistGenreID: Must be a numeric and existing Genre ID or 0 for no filtering.
- ConcertCountryID: Must be a numeric and existing Country ID or 0 for no filtering.
- ConcertCity: The letter(s) or number(s) the city name of the artist must start with, contain or be equal with (depending on SearchType).
- ConcertCitySearchType: Must be "StartsWith" (City must start with searched string), "Contains" (City must contain searched string) or "Equals" (City must equal searched string).
- ConcertPostalCode: The letter(s) or number(s) the postal code of the artist must start with, contain or be equal with (depending on SearchType).
- ConcertPostalCodeSearchType: Must be "StartsWith" (Postal code must start with searched string), "Contains" (Postal code must contain searched string) or "Equals" (Postal code must equal searched string).
- ArtistName: The letter(s) or number(s) the artist name must start with, contain or be equal with (depending on SearchType).
- ArtistNameSearchType: Must be "StartsWith" (Artist name must start with searched string), "Contains" (Artist name must contain searched string) or "Equals" (Song title must equal searched string).
2.2.3 GetSong
Execute this function | View the source code
Gets the data of one specific song. The artist account which is related to the song must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- Mp3ID: Numeric value of an existing song which is online and which related artist is online and part of your artist pool.
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- SongTitle: Title of the song.
- Composer: Composer of the song.
- LyricsAuthor: Author name of the song's lyrics.
- Distribution: Name of song's distributor.
- PerformingRightsOrganization: Name of the performing rights organization this song is assigned to.
- PerformingRightsOrganizationID: ID of the performing rights organization this song is assigned to.
- OtherPerformingRightsOrganization: Name of the performing rights organization this song is assigned to and which has not been added yet the OMS database.
- SongPrice: Price of the song.
- Year: Year of creation.
- SongLabel: Label the song is assigned to.
- SongPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- SongLyrics: Song lyrics.
- LoFiExists: "1" if a lofi stream is available for this song, else "0".
- HiFiExists: "1" if a hifi stream is available for this song, else "0".
- DownloadExists: "1" if downloading this song is possible, else "0".
- FileSize: Size of the MP3 file in Megabyte.
- UploadDate: Date when the song has been uploaded.
- SongGenreID: Genre ID from the selected genre of the song. (see also: 5.2 Genre List)
- SongGenreParentID: Genre ID from the parent genre of the song.
- SongGenreTopParentID: Genre ID from the top parent genre of the song.
- SongGenreName: Name from the genre of the song.
- SongParentGenreName: Name from the parent genre of the song.
- SongTopParentGenreName: Name from the top parent genre of the song.
- PlayChartGenrePos: Position in the play-charts in the genre of this song.
- PlayChartParentGenrePos: Position in the play-charts in the parent genre of this song.
- PlayChartTopParentGenrePos: Position in the play-charts in the top parent genre of this song.
- PlayChartAllGenresPos: Position in the overall play-charts of this song.
- DownloadChartGenrePos: Position in the download-charts in the genre of this song.
- DownloadChartParentGenrePos: Position in the download-charts in the parent genre of this song.
- DownloadChartTopParentGenrePos: Position in the download-charts in the top parent genre of this song.
- DownloadChartAllGenresPos: Position in the download-charts in the top parent genre of this song.
- ArtistID: ID of the artist.
- ArtistName: Name of the artist.
- ArtistURL: Short URL entered by the artist. It redirect www.yourdomain.com/ArtistURL to the artist's page on your website.
- Website: Homepage address by the artist.
- MusicalInfluence: Musical influences of the artist.
- SoundsLike: Other artists which sound similar.
- ArtistPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- FirstOnlineDate: Date when the artist was set online for the first time.
- City: City of residece.
- PostalCode: Postal code of residence.
- CountryID: Country ID of residence. (see also: 5.1 Country List)
- CountryCode: Country code of residence.
- CountryName: Country name of residence.
- ArtistGenreID: Genre ID from the selected genre of the artist. (see also: 5.2 Genre List)
- ArtistGenreParentID: Parent genre ID of the artist.
- ArtistGenreTopParentID: Top parent genre ID of the artist.
- ArtistGenreName: Genre name of the artist.
- ArtistParentGenreName: Parent genre name of the artist.
- ArtistTopParentGenreName: Top parent genre name of the artist.
2.2.4 GetSongArticle
Execute this function | View the source code
Gets the song description text of one song. It's possible to request the text in different languages if those are available.
These are the required elements for this function:
- Mp3ID: Numeric value of an existing song which is online and which related artist is online and part of your artist pool.
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- ArticleText: Text of the article.
- ArticleLanguageID: Language ID of the article.
- ArticleLanguageCode: Language code of the article.
- ArticleLanguageName: Language name of the article.
These are the available filter elements for this function:
- LanguageCode: Must be "de" for German, "en" for English language or left blank for all languages.
2.2.5 GetSongCharts
Execute this function | View the source code
This function will get a song chart list which is ordered by plays or downloads based on your platform. Additionally it will get the basic data about the related artists. You can use a filter to show genre specific charts.
These are the required elements for this function:
- Page: Numeric value which defines the number of page you are getting back.
- Pagesize: Numeric value which defines the number of entries per page.
- ChartType: Must be "Plays" (will display the charts based on plays on your platform) or "Downloads" (will display the charts based on downloads on your platform).
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- Mp3ID: Unique identifier of the song.
- SongTitle: Title of the song.
- Composer: Composer of the song.
- LyricsAuthor: Author name of the song's lyrics.
- Distribution: Name of song's distributor.
- PerformingRightsOrganization: Name of the performing rights organization this song is assigned to.
- PerformingRightsOrganizationID: ID of the performing rights organization this song is assigned to.
- OtherPerformingRightsOrganization: Name of the performing rights organization this song is assigned to and which has not been added yet the OMS database.
- SongPrice: Price of the song.
- Year: Year of creation.
- SongLabel: Label the song is assigned to.
- SongPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- SongLyrics: Song lyrics.
- LoFiExists: "1" if a lofi stream is available for this song, else "0".
- HiFiExists: "1" if a hifi stream is available for this song, else "0".
- DownloadExists: "1" if downloading this song is possible, else "0".
- FileSize: Size of the MP3 file in Megabyte.
- UploadDate: Date when the song has been uploaded.
- SongGenreID: Genre ID from the selected genre of the song. (see also: 5.2 Genre List)
- SongGenreParentID: Genre ID from the parent genre of the song.
- SongGenreTopParentID: Genre ID from the top parent genre of the song.
- SongGenreName: Name from the genre of the song.
- SongParentGenreName: Name from the parent genre of the song.
- SongTopParentGenreName: Name from the top parent genre of the song.
- ChartPosition: Current chart-position of this song inside its genre-chart.
- LastChartGenrePos: Last chart-position of this song inside its genre-chart.
- LastChartParentGenrePos: Last chart-position of this song inside its PARENT-genre-chart.
- LastChartTopParentGenrePos: Last chart-position of this song inside its TOP-PARENT-genre-chart.
- LastChartAllGenresPos: Last chart-position of this song inside ALL-genre-chart.
- ArtistID: ID of the artist.
- ArtistName: Name of the artist.
- ArtistURL: Short URL entered by the artist. It redirect www.yourdomain.com/ArtistURL to the artist's page on your website.
- Website: Homepage address by the artist.
- MusicalInfluence: Musical influences of the artist.
- SoundsLike: Other artists which sound similar.
- ArtistPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- FirstOnlineDate: Date when the artist was set online for the first time.
- City: City of residece.
- PostalCode: Postal code of residence.
- CountryID: Country ID of residence. (see also: 5.1 Country List)
- CountryCode: Country code of residence.
- CountryName: Country name of residence.
- ArtistGenreID: Genre ID from the selected genre of the artist. (see also: 5.2 Genre List)
- ArtistGenreParentID: Parent genre ID of the artist.
- ArtistGenreTopParentID: Top parent genre ID of the artist.
- ArtistGenreName: Genre name of the artist.
- ArtistParentGenreName: Parent genre name of the artist.
- ArtistTopParentGenreName: Top parent genre name of the artist.
These are the available filter elements for this function:
- GenreID: Must be a numeric and existing Genre ID or "0" for no filtering.
2.2.6 GetSongList
Execute this function | View the source code
This function gets the data of all songs of the OMS database which are online and which related artists are online and included inside your artist pool. You can set various filter for this function to filter and limit the output.
These are the required elements for this function:
- Page: Numeric value which defines the number of page you are getting back.
- Pagesize: Numeric value which defines the number of entries per page.
- OrderBy: Must be "SongTitle" (list is ordered alphabetical by song title) "UploadDate" (list is ordered by date when the song was uploaded).
- SortOrder: Must be "ASC" (ascending list) or "DESC" (descending list).
- Fieldlist: Must contain at least one child element.
These are the available field elements for this function:
- Mp3ID: Unique identifier of the song.
- SongTitle: Title of the song.
- Composer: Composer of the song.
- LyricsAuthor: Author name of the song's lyrics.
- Distribution: Name of song's distributor.
- PerformingRightsOrganization: Name of the performing rights organization this song is assigned to.
- PerformingRightsOrganizationID: ID of the performing rights organization this song is assigned to.
- OtherPerformingRightsOrganization: Name of the performing rights organization this song is assigned to and which has not been added yet the OMS database.
- SongPrice: Price of the song.
- Year: Year of creation.
- SongLabel: Label the song is assigned to.
- SongPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- SongLyrics: Song lyrics.
- LoFiExists: "1" if a lofi stream is available for this song, else "0".
- HiFiExists: "1" if a hifi stream is available for this song, else "0".
- DownloadExists: "1" if downloading this song is possible, else "0".
- FileSize: Size of the MP3 file in Megabyte.
- UploadDate: Date when the song has been uploaded.
- SongGenreID: Genre ID from the selected genre of the song. (see also: 5.2 Genre List)
- SongGenreParentID: Genre ID from the parent genre of the song.
- SongGenreTopParentID: Genre ID from the top parent genre of the song.
- SongGenreName: Name from the genre of the song.
- SongParentGenreName: Name from the parent genre of the song.
- SongTopParentGenreName: Name from the top parent genre of the song.
- PlayChartGenrePos: Position in the play-charts in the genre of this song.
- PlayChartParentGenrePos: Position in the play-charts in the parent genre of this song.
- PlayChartTopParentGenrePos: Position in the play-charts in the top parent genre of this song.
- PlayChartAllGenresPos: Position in the overall play-charts of this song.
- DownloadChartGenrePos: Position in the download-charts in the genre of this song.
- DownloadChartParentGenrePos: Position in the download-charts in the parent genre of this song.
- DownloadChartTopParentGenrePos: Position in the download-charts in the top parent genre of this song.
- DownloadChartAllGenresPos: Position in the download-charts in the top parent genre of this song.
- ArtistID: ID of the artist.
- ArtistName: Name of the artist.
- ArtistURL: Short URL entered by the artist. It redirect www.yourdomain.com/ArtistURL to the artist's page on your website.
- Website: Homepage address by the artist.
- MusicalInfluence: Musical influences of the artist.
- SoundsLike: Other artists which sound similar.
- ArtistPictureExists: "1" if the artist has uploaded a picture and "0" if not. (see also: 4.5 Displaying Pictures)
- FirstOnlineDate: Date when the artist was set online for the first time.
- City: City of residece.
- PostalCode: Postal code of residence.
- CountryID: Country ID of residence. (see also: 5.1 Country List)
- CountryCode: Country code of residence.
- CountryName: Country name of residence.
- ArtistGenreID: Genre ID from the selected genre of the artist. (see also: 5.2 Genre List)
- ArtistGenreParentID: Parent genre ID of the artist.
- ArtistGenreTopParentID: Top parent genre ID of the artist.
- ArtistGenreName: Genre name of the artist.
- ArtistParentGenreName: Parent genre name of the artist.
- ArtistTopParentGenreName: Top parent genre name of the artist.
These are the available filter elements for this function:
- GenreID: Must be a numeric and existing Genre ID or 0 for no filtering.
- CountryID: Must be a numeric and existing Country ID or 0 for no filtering.
- City: The letter(s) or number(s) the city name of the artist must start with, contain or be equal with (depending on SearchType).
- CitySearchType: Must be "StartsWith" (City must start with searched string), "Contains" (City must contain searched string) or "Equals" (City must equal searched string).
- PostalCode: The letter(s) or number(s) the postal code of the artist must start with, contain or be equal with (depending on SearchType).
- PostalCodeSearchType: Must be "StartsWith" (Postal code must start with searched string), "Contains" (Postal code must contain searched string) or "Equals" (Postal code must equal searched string).
- SongTitle: The letter(s) or number(s) the title of the song must start with, contain or be equal with (depending on SearchType).
- SongTitleSearchType: Must be "StartsWith" (Song title must start with searched string), "Contains" (Song title must contain searched string) or "Equals" (Song title must equal searched string).
2.2.7 IsArtistMyPayingCustomer
Execute this function | View the source code
Checks if the artist has an active paid service running on your platform. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
2.2.8 SendEmailToArtist
Execute this function | View the source code
Sends an e-mail to one artist. The artist account must be online and exist in your artist pool for this function to get any data.
These are the required elements for this function:
- ArtistID: Numeric value of an existing artist which is online and part of your artist pool.
- SenderEmail: Must contain the email address of the person who sends the email.
- Subject: Must contain the subject line of the email.
- EmailText: Must contain the email text of the email.
2.2.9 GetArtistIDByURL
Execute this function | View the source code
Gets back the ID of an artist by sending in the Artist URL. This function makes sense if you would like to build short URLs like http://www.yourdomain.com/Artistname and automatically refer visitors to the artistpage.
These are the required elements for this function:
- ArtistURL: String value of an existing artist URL (name) which is online and part of your artist pool.
3. Common PHP and Web Service Functions
These are simple functions which you will probably use quite frequently on your website. Part of them are just pure PHP code, some have OMS Web Services built in. For a demonstration of these functions visit click here or open the file common_functions.php which you will find inside the code package you can download from our website here.
4. Javascript Functions
4.1 Including the OMS-Javascript
In order to display music-links for the visitors of your website to play and download songs, you will first of all need to include and modify the following javascript on your website. This javascript needs to be included on everypage where you want to display stream- or download-links.
Add the following script and your partner ID:
<script type="text/javascript" language="JavaScript" src="http://mp3.openmusicsource.net/stream/1.1/js_stream_link.php?oms_partner_id=PARTNER_ID"></script>
Modify the code by replacing PARTNER_ID with your actual partner ID.
If you don't know your partner ID you can look it up by loging into your administration area here.
4.2 Stream-, Download- and Buy-Links
The field elements LoFiLink, HiFiLink and DownloadLink contain the
code which define the link. You will get those field elements from various OMS Web Services
(such as GetSong). Take
this code and put it on your page as javascript (you need to add the surrounding script tags)
wherever you want the links to appear. (In case the song you display is a paid download, the
field element DownloadLink will return a buy-link.)
The code you put on your page should look like so (song ID is
imaginery):
Add the following code to configure the look of your lofi-, hifi- and download links:
<script type="text/javascript" language="JavaScript">
// LOW QUALITY LINKS
_oms_lofi_txt = 'LINKNAME';
_oms_lofi_opts['OPTION'] = 'SETTING'; // remove this line if you don't use options
_oms_lofi_opts['OPTION'] = 'SETTING'; // on the other hand add as many as you need
// HIGH QUALITY LINKS
_oms_hifi_txt = 'LINKNAME';
_oms_hifi_opts['OPTION'] = 'SETTING'; // remove this line if you don't use it
// DOWNLOAD LINKS
_oms_download_txt = 'LINKNAME';
_oms_download_opts['OPTION'] = 'SETTING'; // remove this line if you don't use options
</script>
Modify it as follows:
// LOW QUALITY LINKS
_oms_lofi_txt = 'LINKNAME';
_oms_lofi_opts['OPTION'] = 'SETTING'; // remove this line if you don't use options
_oms_lofi_opts['OPTION'] = 'SETTING'; // on the other hand add as many as you need
// HIGH QUALITY LINKS
_oms_hifi_txt = 'LINKNAME';
_oms_hifi_opts['OPTION'] = 'SETTING'; // remove this line if you don't use it
// DOWNLOAD LINKS
_oms_download_txt = 'LINKNAME';
_oms_download_opts['OPTION'] = 'SETTING'; // remove this line if you don't use options
</script>
-
Replace LINKNAME with what you would like to be displayed as the link.
For example: 'Click to play' or '<img src="play_button.png" height="16" width="16" alt="play" />'. - Replace OPTION with an attribute you would like to add to the <a href> tag, for example 'class' or 'style' and so on. The corresponding SETTING needs to be replaced with the content of the attribute, for example 'my_css_class' or 'color:blue;'.
<script type="text/javascript" language="JavaScript">
// BUY LINKS
_oms_buy_price_position = 'PRICE_POSITION';
_oms_buy_price_opts['OPTION'] = 'SETTING'; // remove this line if you don't use options
_oms_buy_txt = 'TXT_NAME';
_oms_buy_txt_type = 'TXT_TYPE';
_oms_buy_txt_opts['OPTION'] = 'SETTING'; // remove this line if you don't use options
</script>
// BUY LINKS
_oms_buy_price_position = 'PRICE_POSITION';
_oms_buy_price_opts['OPTION'] = 'SETTING'; // remove this line if you don't use options
_oms_buy_txt = 'TXT_NAME';
_oms_buy_txt_type = 'TXT_TYPE';
_oms_buy_txt_opts['OPTION'] = 'SETTING'; // remove this line if you don't use options
</script>
- Replace PRICE_POSITION with 'before' or 'after'. It determines if the linked price will be placed before or after your text (if you entered any) inside the HTML. The default value is 'before'.
- Replace OPTION and SETTING with attribute(s) for the <a href> tag, see previous example.
- Replace TXT_NAME with what you would like to be displayed as an additional text. For example: 'Click to Buy' or an image.
- Replace TXT_TYPE with 'link', 'span' or 'join_with_price' - 'link' makes your additional text a link (linking to the OMS shopping cart), 'span' surrounds your text by a <span> tag (so you can still add options to it) and 'join_with_price' joins your text with the price link (options of the price will be used then). The default value is 'link'.
4.3 Playlist-Streams for Artists
This is how you can display a playlist-stream of all tracks of one artist.
The code you put on your page should look like so (song ID is
imaginery):
<script type="text/javascript" language="JavaScript">
opts = new Array(); // you can delete these lines...
opts['OPTION'] = 'SETTING'; // if you don't use any options, or also...
opts['OPTION'] = 'SETTING'; // add as many options you need.
show_play_all_link(ARTIST_ID, 'LINKTYPE', 'LINKNAME', opts);
</script>
opts = new Array(); // you can delete these lines...
opts['OPTION'] = 'SETTING'; // if you don't use any options, or also...
opts['OPTION'] = 'SETTING'; // add as many options you need.
show_play_all_link(ARTIST_ID, 'LINKTYPE', 'LINKNAME', opts);
</script>
- Replace ARTIST_ID with an Artist-ID
- Replace 'LINKTYPE' with 'low' or 'high'. Depending on your choice, the script will display a lofi-/hifi-stream of all tracks from the artist.
-
Replace 'LINKNAME' by what you would like to be displayed as the link.
For example: 'Click to play' or '<img src="play_button.png" height="16" width="16" alt="play" />'. - Replace OPTION with an attribute you would like to add to the <a href> tag, for example 'class' or 'style' and so on. The corresponding SETTING needs to be replaced with the content of the attribute, for example 'my_css_class' or 'color:blue;'.
4.4 Playlist-Streams for Chart-Ranges
This functions displays a playlist-stream (lofi or hifi) for a selected chartrange of your
choice (e.g. display a hifi-stream for the current top 10 downloaded songs of your rock
chart).
Note you need to include the OMS Javascript for this purpose.
Include this javascript code:
Note you need to include the OMS Javascript for this purpose.
<script type="text/javascript" language="JavaScript">
opts = new Array(); // you can delete these lines...
opts['OPTION'] = 'SETTING'; // if you don't use any options, or also...
opts['OPTION'] = 'SETTING'; // add as many options you need.
show_chart_link(GENRE_ID, 'CHARTTYPE', 'QUALITY', 'START', 'END', 'LINKNAME', opts);
</script>
Modify it as follows:
opts = new Array(); // you can delete these lines...
opts['OPTION'] = 'SETTING'; // if you don't use any options, or also...
opts['OPTION'] = 'SETTING'; // add as many options you need.
show_chart_link(GENRE_ID, 'CHARTTYPE', 'QUALITY', 'START', 'END', 'LINKNAME', opts);
</script>
- Replace GENRE_ID with a Genre-ID from the genre you would like to display the charts for. Set it to 0 if you want to display your overall charts.
- Replace 'CHARTTYPE' with 'plays' or 'downloads' to display the play- or the download-charts for the selected genre.
- Replace 'QUALITY' with 'low' or 'high' to display a low or high quality stream.
- Replace 'START' and 'END' with the chart range you would like to be included for the playlist (e.g. '1' and '10' for the first 10 songs).
-
Replace 'LINKNAME' by what you would like to be displayed as the link.
For example: 'Click to play' or '<img src="play_button.png" height="16" width="16" alt="play" />'. - Replace 'OPTIONAL' with anything you would like to add to the link-code inside the <a> tag). Use it to define a CSS class for your link, trigger a javascript function or whatsoever. If you don't need it just leave it blank, it's optional.
4.5 Displaying Pictures
At the moment there are two different kind of images which can be read out from the OMS database: artist and song pictures. We offer a tool which lets you resize these pictures on the fly. Modify the following URL to fit your needs and use it as the source attribute of an image tag.
http://pics.openmusicsource.net/cgi-bin/get_pic.cgi?type=__&id=__&max_size=__&max_width=__&max_height=__You will need to replace the blank spaces (underscores) beside the variables:
- type: enter song for a song picture or artist for an artist picture
- id: enter an MP3 ID for a song picture or an Artist ID for an artist picture
- max_size: enter orig, max_ratio or max_all
- orig = maximum size of the original will be kept (if it fits into max_width, max_height specified by the user)
- max_ratio = will be resized to max_width (or max_height) according to ratio
- max_all = will be resized to max_width and max_height
- max_width: enter your desired width in pixels
- max_height: enter your desired height in pixels
Let's say we have an artist picture of 295 x 295 pixels in size and would like to display it with 150 x 150, 100 x 100 and 50 x 50 pixels, then we would use this code as our image's source:
http://pics.openmusicsource.net/cgi-bin/get_pic.cgi?type=artist&id=35748&max_size=max_ratio&max_width=150&max_height=150
http://pics.openmusicsource.net/cgi-bin/get_pic.cgi?type=artist&id=35748&max_size=max_ratio&max_width=100&max_height=100
http://pics.openmusicsource.net/cgi-bin/get_pic.cgi?type=artist&id=35748&max_size=max_ratio&max_width=50&max_height=50
5. Appendix
5.2 Country List
Here you have the list of countries which are existing inside the OMS network.
| Country ID | Country Code | Country Name |
| 3 | AF | Afghanistan |
| 4 | AL | Albania |
| 5 | DZ | Algeria |
| 6 | AS | American Samoa |
| 7 | AD | Andorra |
| 8 | AO | Angola |
| 9 | AI | Anguilla |
| 10 | AQ | Antarctica |
| 11 | AG | Antigua and Barbuda |
| 12 | AR | Argentina |
| 13 | AM | Armenia |
| 14 | AW | Aruba |
| 1 | AU | Australia |
| 2 | AT | Austria |
| 15 | AZ | Azerbaijan |
| 16 | BS | Bahamas |
| 17 | BH | Bahrain |
| 18 | BD | Bangladesch |
| 19 | BB | Barbados |
| 24 | BY | Belarus |
| 20 | BE | Belgium |
| 21 | BZ | Belize |
| 22 | BJ | Benin |
| 23 | BM | Bermudas |
| 25 | BT | Bhutan |
| 26 | BO | Bolivia |
| 27 | BA | Bosnia-Herzegowina |
| 28 | BW | Botswana |
| 29 | BV | Bouvet Island |
| 30 | BR | Brazil |
| 31 | BN | Brunei |
| 32 | BG | Bulgaria |
| 33 | BF | Burkina Faso |
| 34 | BI | Burundi |
| 42 | KH | Cambodia |
| 43 | CM | Cameroon |
| 35 | CA | Canada |
| 44 | CV | Cape Verde |
| 41 | KY | Cayman Islands |
| 38 | CF | Central African Republic |
| 36 | CL | Chile |
| 39 | CN | China |
| 48 | CX | Christmas Island |
| 53 | CC | Cocos Islands |
| 46 | CO | Colombia |
| 47 | KM | Comoros |
| 49 | CG | Congo |
| 40 | CK | Cook Islands |
| 45 | CR | Costa Rica |
| 37 | CI | Cote d-Ivoire |
| 50 | HR | Croatia |
| 52 | CY | Cyprus |
| 51 | CZ | Czech Republic |
| 54 | DK | Denmark |
| 55 | DC | District of Columbia |
| 56 | DM | Dominica |
| 57 | DO | Dominican Republic |
| 58 | DJ | Dschibuti |
| 64 | TP | East-Timor |
| 59 | EC | Ecuador |
| 60 | EG | Egypt |
| 63 | SV | El Salvador |
| 61 | GQ | Equatorial Guinea |
| 65 | ER | Eritrea |
| 66 | EE | Estonia |
| 62 | GQ | Ethiopia |
| 68 | FK | Falkland Islands |
| 67 | FO | Faroe Islands |
| 69 | FJ | Fidschi |
| 70 | FI | Finland |
| 71 | FR | France |
| 72 | GF | French Guiana |
| 73 | PF | French Polynesia |
| 74 | GA | Gabun |
| 76< |


show_download_link(123456);
</script>