Location: PHPKode > scripts > Imeem > imeem/example.php

include "imeem.class.php";

$ajmim = new Imeem();

//Get song ID from song's url. It is not ID from url, but other one. This function downloads page from
//this url and parses it to get correct song ID. The best way is to cache ID's somewhere because this
//function is pretty slow. It accepts only one parameter, and it is url of the song.

$songid = $ajmim->GetSongIdFromUrl('http://avramovic.imeem.com/music/QZwJL1l6/rula/');

//Embed song on web page. This function accepts four parameters, but only first is required.
// 1st: Song ID used on song's page in embed code (use function GetSongIdFromUrl)
// 2nd: AutoPlay - should song start playing immediately (true/false) - default: true
// 3rd: Player width in pixels - default: 300
// 4th: Player height in pixels - default: 80

echo $ajmim->EmbedSong($songid);

Return current item: Imeem