First of all... Fantastic work! This is what boxee has been missing.
I've "updated" your script to add the ability to "throw" links to the Boxee Box. It was pretty simple. Updates only required to index.php. I added another option on the main page, by adding:
Code:
<li>
<form name="input" action="index.php" method="get">
Weblink: <input size="100" type="text" name="source" />
<input type="submit" value="Submit" />
</form>
</li>
and then after the last </div> before the </body> I added:
Code:
<?php
if(!empty($_GET['source']))
{
//get argument of the source
$location = $_GET['source'];
$request = '{"jsonrpc" : "2.0", "method": "XBMC.Play", "params" : { "file" : "' . $location . '"}, "id": 1}';
$array = jsonQuery($request);
echo " going to URL: <b>" . $location . "</b>";
}
?>
This means I can just type a URL from any web browser in and send boxee to that web page, or play that video, etc. SUPER handy!
Also, made a quick button for FireFox that throws the link of whatever page I'm currently surfing over to my BoxeeBox.
Just cut and paste this code into a shortcut in FireFox, etc:
Code:
javascript:var%20b=document.body;if(b&&!document.xmlVersion){void(window.open('http://192.168.0.2:81/index.php?source='+location.href,'boxee_thrower'));}else{}
Hope this is useful for others!
Bookmarks