<?php 
require("../includes/dcop.class.php"); 
 
$dcop = new dcop; 
 
$dcop->application("juk","guruevi"); //1st argument is necessary, 2nd and 3rd are either specified in your class 
                         //or the defaults will be used 
 
$dcop->app_function("Player","playingString"); //call juk's player function and get playingstring as an argument 
$playingstring = implode(" ",$dcop->call()); //This should return what's currently playing on juk 
 
$dcop->app_function("Player","trackProperty","Album"); //gimme the album 
$playingalbum = implode(" ",$dcop->call()); 
 
$dcop->app_function("Player","totalTime"); //how much is the total time (in seconds) 
$playing_tot_time = implode(" ",$dcop->call()); 
 
$dcop->app_function("Player","currentTime"); //how much is the current time (in seconds) 
$playing_cur_time = implode(" ",$dcop->call()); 
 
echo "Currently playing in JuK: " . $playingstring . " from the album: " . $playingalbum . "\n"; 
echo "Currently " . $playing_cur_time . " seconds far in the " . $playing_tot_time . " seconds long song\n\n"; 
echo "This is just an example of what DCOP for you can do - submit bugs in the PHP scripts to [email protected]\n"; 
echo "License: GPL\n"; 
 
?>
 
 |