Page 1 of 1

start php script from sabnzbd

Posted: July 14th, 2010, 6:39 am
by skycryer
Hey GUys i have a php script i wish to start from sabnzbd but how?
I use the php cli someone posted here for me but how can i start this from sabnzbd?
Please help i love this app and the possibilities with scripts.

Re: start php script from sabnzbd

Posted: November 14th, 2010, 11:05 am
by premiso
Pretty simple, make a shell script like this:

Code: Select all

#!/usr/bin/env php
<?php
// processing code here
// $argv will contain an array with arguments like normal
?>
Name it something.sh and chmod +x it then add it to the post-processing folder and choose it for whatever the script should be post processing.

This of course assumes you are on a Linux based OS for the sab server.

For windows, you would just create a batch script and call the php script:

Code: Select all

php -f C:\location\of\script.php
And use that for the post-processing script for the items it is to post-process.