Page 1 of 1

send same nzb to two different servers ?

Posted: October 23rd, 2011, 8:40 am
by hackerabcd
how could i set up the firefox sab plugin to send the same nzb to two different servers running sabnzbd . both servers are on two different sites ?

regards

peter

Re: send same nzb to two different servers ?

Posted: November 16th, 2011, 5:05 pm
by exussum
http://forums.sabnzbd.org/viewtopic.php?f=9&t=9217

Maybe something like that ? or have another script that takes the sab api key and intercepts it before forwarding the request to both of the other servers

eg

http server hosting "sabnzbd/api"
the script behind it could look something like

if($_GET['apikey']=="Somekey"){
$ch = curl_init("http://www.sabserver1.com/");
$fp = fopen($_ENV["REQUEST_URI"], "w");

curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
$ch = curl_init("http://www.sabserver2.com/");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);