Help using PHP/SOAP/WSDL to get Ads4Dough subids

Status
Not open for further replies.

Grant29

New member
Jul 29, 2006
146
0
0
Hi,

I'm trying to pull my subid's from Ads4dough through the PHP/SOAP interface. I believe that I am actually authenticating (ie, if I put the wrong password in I'll get an error), but I get a response telling me that there are no results found. I haven't been able to find any code snippets on the web to help me figure out what I'm doing wrong.

Here is my code:

PHP:
require_once('nusoap/lib/nusoap.php');

$client = new nusoap_client('http://ads4dough.directtrack.com/api/soap_affiliate.php');

$username = "CDxxxx";
$password = "password_here";

$parts = array(
           'client'     => 'ads4dough',
           'add_code'   => $username,
           'password'   => $password,
           'primary'    => 'subid1',
           'secondary'  => 'subid2',
           'tertiary'   => 'subid3',
           'quaternary' => 'subid4',
           'keyword'    => '',
           'program_id' => '',
           'start_date' => '2008-11-03',
           'end_date'   => '2008-11-04'
           );

$output = $client->call('getSubIDStats', $parts);

//print_r($client);
print_r($output);
I get this output:

<?xml version="1.0" encoding="utf-8"?>
<subidStatistics>

<no_results>No Results found</no_results>

</subidStatistics>
I've even tried populating the program_id variable with no success.

You can find the wsdl here: NuSOAP: DirectTrackWebServices
You can download nusoap here: SourceForge.net: NuSOAP - SOAP Toolkit for PHP

Is it possible that the problem is on the ads4dough end? When I log into ads4dough I can export my stats and see my subids as expected so I'm not sure why I can't get them via the soap interface.


Thanks,
Grant
 


Are you sending the subid via the "o=" or via "subid1=", "subid2=", etc.?
 
on A4D the subid is not found in the subids parameter but in the O parameter (optional information I think)
that's what you need to pull.
 
That's kind of what I figured. However I tried to change the link from the above type to this type:

http://www.ads4dough.com/redirect.asp?a=601&b=2279&d=0&l=0&o=subidhere&p=0

However I couldn't get the link to work. I figured the real goal was to get something that looks like:

http://www.ads4dough.com/redirect.asp?a=601&b=2279&d=0&l=0&o=subidhere&p=0&subid1=subidherealso

This didn't work either. I think the soap interface is actually looking for the subid1 (and subid2,subid3,subid4,subid5) parameters.
 
Do you think that working WSDL solution for ClickBooth will be helpful for you? If yes - PM me, i'll send it.
 
Thanks beneth, this looks like it will get what I was looking for! I just need to parse the data correctly.
 
As mentioned above you want to use the optionalinfo wsdl function. Not the getSubId one. Go here NuSOAP: DirectTrackWebServices click on optionalinfo and you'll get the data you need that way. At least I'm pretty sure that's how it works, it's been a while since I coded one up.
 
Status
Not open for further replies.