Advertisement
Guest User

xbmc json command

a guest
Jun 8th, 2014
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2. $XBMC_USER = "";
  3.     $XBMC_PASS = "";
  4.     $XBMC_IP = "localhost";
  5.     $XBMC_PORT = "8080";
  6.     $url = "";
  7.     $rurl = "";
  8.  
  9.     if($XBMC_PASS == ""){
  10.         $url = "http://" . $XBMC_IP . ":" . $XBMC_PORT . "/jsonrpc";
  11.         $rurl = 'http://'.$XBMC_IP.':'.$XBMC_PORT.'/';
  12.     } else{
  13.         $url = "http://" . $XBMC_USER . ":" . $XBMC_PASS . "@" . $XBMC_IP . ":" . $XBMC_PORT . "/jsonrpc";
  14.         $rurl = 'http://'.$XBMC_USER.':'.$XBMC_PASS.'@'.$XBMC_IP.':'.$XBMC_PORT.'/';
  15.     }
  16.    
  17. $coverart = '{"jsonrpc":"2.0","method":"Player.GetItem","params":{"playerid":1,"properties":["art"]},"id":1}';
  18.  
  19. $raw_art = "";
  20. $art = rawurldecode($raw_art);
  21. ?>
  22. <!doctype html>
  23. <html>
  24. <head>
  25. <meta charset="UTF-8">
  26. <title>Untitled Document</title>
  27. </head>
  28.  
  29. <body>
  30.  
  31. <img src="<?php echo $art ?>" width="136" height="200">
  32.  
  33. </body>
  34. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement