API Help - Add Complex URL

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
roger1024
Release Testers
Release Testers
Posts: 7
Joined: May 21st, 2009, 6:51 pm

API Help - Add Complex URL

Post by roger1024 »

Hi,

I writing an alternate front end in PHP (mostly my own RSS parser) and I'm having some problem with the "addurl" parameter. My problem is that the URL I wan't sabnzbd to download also have a bunch of variables in the url. The software don't know which parameter is the URL and which are its own parameters and it jst freaks out. Is there anyway to specify the start and the end of the URL inside another URL. Using "" don't seem work...

$link = "http://www.nzbs.org/index.php?action=ge ... xxxxxxxxxx"

"http://$nzb_host:$nzb_port/sabnzbd/api?mode=addurl&name=$link&apikey=$nzb_apikey"

Thanks,

Roger
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: API Help - Add Complex URL

Post by shypike »

Have you tried encoding the special characters, so & becomes %26 and ? becomes %3F ?
Just replace the character with its hexadecimal code prefixed with %.
roger1024
Release Testers
Release Testers
Posts: 7
Joined: May 21st, 2009, 6:51 pm

Re: API Help - Add Complex URL

Post by roger1024 »

Problem solved!

Thanks!
Post Reply