-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcontrol.php
More file actions
55 lines (43 loc) · 1.08 KB
/
control.php
File metadata and controls
55 lines (43 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?
#
# $Id$
#
# Inspired by http://www.whatsmyip.org/itunesremote/
#
include('lib.php');
echo "<META HTTP-EQUIV=refresh content=10;URL=./>";
$q = $_GET['q'];
switch ($q){
case "":
echo "You need to send me a command, then I shall execute it";
break;
case "play":
run_command('tell app "iTunes" to play');
echo "Playing";
break;
case "pause":
run_command('tell app "iTunes" to pause');
echo "Pausing";
break;
case "playpause":
run_command('tell app "iTunes" to playpause');
echo "Toggling Play";
break;
case "next":
run_command('tell app "iTunes" to next track');
echo "Next Track";
break;
case "prev":
run_command('tell app "iTunes" to previous track');
echo "Previous Track";
break;
case "louder":
run_command('tell app "iTunes" to set sound volume to sound volume + 5');
echo "Turning Up the Volume";
break;
case "quieter":
run_command('tell app "iTunes" to set sound volume to sound volume - 5');
echo "Turning Down the Volume";
break;
}
?>