Skip to content
WJunction - Webmaster Forum

nzbcache - Nzb Cache

Status
Not open for further replies.
nzb[cache]
nzbcache is a free service for caching nzb files online.

You can not search or list nzbcache files that are stored here, you can only access them if you already know the info_hash value of the nzb you want to download.
The way to access nzbs is simple, you just use the url http://nzbcache.info/nzb/INFO_HASH The nzb files are saved to disk in gzip format, that means you have to use a browser that understands the gzip transfer encoding.

Code:
http://www.nzbcache.info/
 
Last edited:

3 comments

very nice site, I'm trying to make a script to read the contents of a folder, and upload all .NZBs, and return a list with the links, instead of uploading one by one. Using http://www.nzbcache.info/api.php

PHP:
<?php
$url = "http://nzbcache.info/upload-api.php";
$fields = array();
if ($handle = opendir(".")) {
    while ($entry = readdir($handle)) {
        if (is_file($entry)) {
            $fields[] = '@'.$entry;
		        }
    }
    closedir($handle);
}
$indexCount	= count($fields);
// print 'em
print("<TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks>\n");
print("<TR><TH>Filename</TH><th>HASH</th></TR>\n");
// loop through the array of files and print them all
for($index=0; $index < $indexCount; $index++) {
        if (substr("$fields[$index]", 0, 1) != "."){ // don't list hidden files
		$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields[$index]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$hash = curl_exec($ch);

		print("<TR><TD>$fields[$index]</td>");
		print("<td>");
		print($hash);
		print("</td>");
		print("</TR>\n");
	}
}
print("</TABLE>\n");

?>

I don't know much coding, and this script is not working, could someone please help me?
 
Customize to your needs :)


Code:
<?php function dirlist__($nzb_dir, $full_path) {     $results = array();          $handler = opendir($nzb_dir);          while ($file = readdir($handler)) {         if ($file != "." && $file != "..") {             $url    = "http://nzbcache.info/upload-api.php";             $fields = array(                 'file' => "@" . $full_path . $file             );             $ch     = curl_init();             curl_setopt($ch, CURLOPT_URL, $url);             curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);             curl_setopt($ch, CURLOPT_VERBOSE, 1);             $hash = curl_exec($ch);             print("<TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks>\n");             print("<TR><TH>Filename</TH><th>HASH</th></TR>\n");                          print("<TR><TD>$file</td>");             print("<td>");             print($hash);             print("</td>");             print("</TR>\n<br />");                          print("</TABLE>\n");             $results[] = $file;         }              }               closedir($handler);     return "";      } echo(dirlist__("./test/", "/home/www/")); ?>
 
Last edited:
Status
Not open for further replies.

About the author

A
Active Member · Joined
185
Messages
51
Reactions
28
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom