|
2013-05-15
, 20:12
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#2
|
"playTo" : { "name" : "playTo my pc", "url" : "http://192.168.1.XXX/?url={{url}}" }
"playTo" : { "name" : "playTo my pc", "url" : "http://192.168.1.XXX/?url={{url}}", "order" : 1, "visible" : 1 }
The Following User Says Thank You to qwazix For This Useful Post: | ||
|
2013-05-15
, 21:17
|
Posts: 882 |
Thanked: 1,310 times |
Joined on Mar 2007
|
#3
|
http://%22%3bsudo%20reboot%3becho%22
|
2013-05-15
, 21:30
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#4
|
<?php $u = $_GET['url']; echo $u; $u = rawurlencode($u); if (isset($u)&&trim($u!="")){ exec('DISPLAY=:0 firefox "http://localhost/openInPopup.php?url='.$u.'"'); } ?> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <form action=index.php> <input name=url autofocus> <button>go</button> </form> <form action=index.php> <input type=hidden name=url value=about:blank> <button>stop</stop> </form>
<input id=url value="<?=rawurldecode($_GET['url'])?>" /> <script> window.open(document.getElementById('url').value,"playToPopup",'height=500,width=1000'); </script>
firefox javascript:window.open( ... )
|
2013-05-16
, 06:38
|
|
Posts: 1,974 |
Thanked: 1,834 times |
Joined on Mar 2013
@ india
|
#5
|
As I mostly use YouTube and such to listen to individual songs, I wanted to be able to redirect the current url to firefox on my desktop.
The solution I found is to install nanoweb on the desktop (apache works fine too), change it to run as my desktop user, not www-data (you have to edit /etc/nanoweb.conf for that) and have it run the following index.php
<?php
$u = $_GET['url'];
if (isset($u)&&trim($u!="")){
exec('DISPLAY=:0 firefox "'.$u.'"');
}
?>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<form action=index.php>
<input name=url autofocus>
<button>go</button>
</form>
You can also enter the url directly as such
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla 末 contactlaunch 末 timenow
Nemo UX blog: Grog
My website: qwazix.com
My job: oob
Last edited by qwazix; 2013-05-15 at 21:00. Reason: Added double quotes around firefox parameter so that it handles url with spaces