daves
08-07-07, 22:46
Hi
Im using this code: (with password/user put in!)
<?php
// DETERMINE SYSTEM SETTINGS, depending on OS
if (!defined('HOME_PATH')) {
$sPath= dirname(__FILE__).DIRECTORY_SEPARATOR;
define('HOME_PATH', $sPath);
}
// USER DETAILS
define('USER_ID', 'xxxxx');
define('USER_PASS', 'yyyyyyyyyyyyyyyyyyyyyyyyyyy');
// LOAD CLASSES
require_once('includes'.DIRECTORY_SEPARATOR.'class es'.DIRECTORY_SEPARATOR.'class.api_client.php');
//new client
$oClient = new api_client();
//make the SOAP call
$oMerchants = $oClient->call('getMerchant' );
//get the products array
$aMerchants = $oMerchants->getMerchantReturn;
//print each product name to the page
$i=1;
foreach ($aMerchants as $oProduct) {
print $i++."\n";
print $oProduct->iId."\n";
print $oProduct->sName."\n";
print $oProduct->sLogoUrl."\n";
print $oProduct->sDisplayUrl."\n";
print $oProduct->sClickThroughUrl."\n";
print "--------------------------------------------------------------------\n\n\n";
}
?>
and getting this error:
Warning: Invalid argument supplied for foreach() in /home/mydomain/public_html/includes/soap/classes/class.php4Client.php on line 113
Warning: Invalid argument supplied for foreach() in /home/mydomain/public_html/includes/soap/classes/class.php4Client.php on line 152
Anyone else get this to work? I have had this error before on another call to API and was told it was down to "Affiliate Window conducting some testing at server side"... and to try again later...
Am i now doing something wrong or is this AW issue again?
Thanks
Dave
Im using this code: (with password/user put in!)
<?php
// DETERMINE SYSTEM SETTINGS, depending on OS
if (!defined('HOME_PATH')) {
$sPath= dirname(__FILE__).DIRECTORY_SEPARATOR;
define('HOME_PATH', $sPath);
}
// USER DETAILS
define('USER_ID', 'xxxxx');
define('USER_PASS', 'yyyyyyyyyyyyyyyyyyyyyyyyyyy');
// LOAD CLASSES
require_once('includes'.DIRECTORY_SEPARATOR.'class es'.DIRECTORY_SEPARATOR.'class.api_client.php');
//new client
$oClient = new api_client();
//make the SOAP call
$oMerchants = $oClient->call('getMerchant' );
//get the products array
$aMerchants = $oMerchants->getMerchantReturn;
//print each product name to the page
$i=1;
foreach ($aMerchants as $oProduct) {
print $i++."\n";
print $oProduct->iId."\n";
print $oProduct->sName."\n";
print $oProduct->sLogoUrl."\n";
print $oProduct->sDisplayUrl."\n";
print $oProduct->sClickThroughUrl."\n";
print "--------------------------------------------------------------------\n\n\n";
}
?>
and getting this error:
Warning: Invalid argument supplied for foreach() in /home/mydomain/public_html/includes/soap/classes/class.php4Client.php on line 113
Warning: Invalid argument supplied for foreach() in /home/mydomain/public_html/includes/soap/classes/class.php4Client.php on line 152
Anyone else get this to work? I have had this error before on another call to API and was told it was down to "Affiliate Window conducting some testing at server side"... and to try again later...
Am i now doing something wrong or is this AW issue again?
Thanks
Dave