start php script from sabnzbd

Come up with a useful post-processing script? Share it here!
Post Reply
skycryer
Newbie
Newbie
Posts: 5
Joined: June 22nd, 2010, 7:34 am

start php script from sabnzbd

Post 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.
premiso
Release Testers
Release Testers
Posts: 16
Joined: June 28th, 2010, 11:43 am

Re: start php script from sabnzbd

Post 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.
Last edited by premiso on November 14th, 2010, 12:54 pm, edited 1 time in total.
Post Reply