-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnzbget.php
48 lines (33 loc) · 909 Bytes
/
nzbget.php
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
<?php
// Settings
include 'config.php';
include 'header.php';
echo "<title>NzbGet Download Queue | ".$site_name."</title>";
echo "<center>";
//Check for SSL
if ($nzbget_ssl == "1")
{ $nzbget_prot = "https://";}
else
{ $nzbget_prot = "http://"; }
// Feed URL - http://username:password@localhost:6789/jsonrpc
$feed = $nzbget_prot.$nzbget_username.":".$nzbget_passsword."@".$nzbget_ip."/jsonrpc/listfiles";
$sbJSON = json_decode(file_get_contents($feed));
if($nzbget_enabled == "1")
{
// What are you!?
echo "<h1>NzbGet Download Queue</h1>";
// if empty - create
foreach($sbJSON as $job) {
// Show Details
echo "<b>Filename:</b> ".$job['NZBNicename']."<br>";
echo "<b>Size:</b> ".$job->{mb}."<br>";
//echo "<b>Size Left:</b> ".$job->{mbleft}."<br><br>";
}
}
else
{
echo "<br><b>Module is disabled!</b>";
}
include 'footer.php';
echo "</center>";
?>