Is it possible to have sabnzbd+ run a post processing script that parses variables to a php script and runs it? Preferable under windows as well as linux. The reason I ask is I have a fully working php script that does everything I want and I would like to make sabnzbd execute it. Any assistance would be great.
Thanks
Parse Variables to php and run php script
Re: Parse Variables to php and run php script
Do you mean on the server side or on the client of PHP?
And do you mean the variable from the download job?
Server side: yes, a (SAB) script can write anything, so also a PHP source page.
Client side: can you parse the variables into an URL to that PHP page as input? So, is it a GET, and not a POST?
And do you mean the variable from the download job?
Server side: yes, a (SAB) script can write anything, so also a PHP source page.
Client side: can you parse the variables into an URL to that PHP page as input? So, is it a GET, and not a POST?
Re: Parse Variables to php and run php script
Server side will do. How would I do this?
Client side would work as I can do that but its more work so server side it will be
Client side would work as I can do that but its more work so server side it will be
Re: Parse Variables to php and run php script
So you want a script to converts the name of the downloaded file into a PHP source file?
Can you give the PHP format source page, and point where you want the SAB-download variables? See http://wiki.sabnzbd.org/user-scripts for the variables that are available.
Can you give the PHP format source page, and point where you want the SAB-download variables? See http://wiki.sabnzbd.org/user-scripts for the variables that are available.
Re: Parse Variables to php and run php script
Not exactly I just want all the information sabnzbd can give me but in a way that php can read it and then for the post processing script the execute the php script. This is what I have. A php file that uploads stuff I download. However for it to be automated I need to know some stuff about each file so I want a post processing script that collects all the information about the nzb (1 - 7) and then hands it over to php in the form of 7 variable and runs the php file. In the php file I will set up the variables so they are the same as the ones the post processing script gives me.
Sorry if this is very confusing..
Sorry if this is very confusing..
Re: Parse Variables to php and run php script
I still don't understand what you want, and whether you want it on the PHP server side or on the client side. Sorry.Mikie wrote:Not exactly I just want all the information sabnzbd can give me but in a way that php can read it and then for the post processing script the execute the php script. This is what I have. A php file that uploads stuff I download. However for it to be automated I need to know some stuff about each file so I want a post processing script that collects all the information about the nzb (1 - 7) and then hands it over to php in the form of 7 variable and runs the php file. In the php file I will set up the variables so they are the same as the ones the post processing script gives me.
Sorry if this is very confusing..
Re: Parse Variables to php and run php script
When a download finished I need complete.php to be run automatically
In complete.php I have variables
$name
$directory
$status
$category
which need to be populated from the information that sabnzbd has.
Can this be done via any method. As long as complete.php is run and the variables are made available I am happy.
In complete.php I have variables
$name
$directory
$status
$category
which need to be populated from the information that sabnzbd has.
Can this be done via any method. As long as complete.php is run and the variables are made available I am happy.
Re: Parse Variables to php and run php script
So what's the problem? On Linux, you can probably just run a php script directly, by pointing the shebang line to a command line php executable, etc, etc:
Might have to use an intermediate 'regular' shell script to start php if your operating system doesn't support this. Sab passes a number of arguments to every postprocessing script, just use them (or pass them along in the intermediate script) as desired. Every scripting language can deal with command line arguments, php is no exception.
Code: Select all
#!/usr/bin/php
<? phpinfo() ?>
Re: Parse Variables to php and run php script
I would like it to run on windows and need a step by step guide on how to do it