错误报告(0);
session_start();
$link=$_POST['主机'];
$_SESSION['主机']=$链接;
$client = new SoapClient("http://".$link."/api/soap/?wsdl");
/*api credentials*/
$apiuser=$_POST['User'];
$_SESSION['User']=$apiuser;
$apikey =$_POST['Key'];
$_SESSION['Key']=$apikey;
/*Action to be made */
$action =$_POST['Catalog'];
$_SESSION['Catalog']=$action;
/*Error trapping if in case number will be input*/
if(ctype_alpha(!$action))
{
die('Incorrect format');
}
别的
{
$sess_id= $client->login($apiuser, $apikey);
/ api登录/
echo"Total Active list Product:".(count($client->call($sess_id, $action)));
回声”
";";print_r($result=$client->call($sess_id,$action));
回声”
}
?>
大批
(
[0] => 数组
(
[product_id] => 1
[sku] => ROx12345
[name] => acer netbook
[set] => 4
[type] => simple
[category_ids] => Array
(
)
[website_ids] => Array
(
[0] => 1
)
)
[1] => Array
(
[product_id] => 2
[sku] => Cats1234
[name] => starbucks mug
[set] => 4
[type] => simple
[category_ids] => Array
(
)
[website_ids] => Array
(
[0] => 1
)
)
[2] => Array
(
[product_id] => 3
[sku] => samsung2141
[name] => samsung 3110
[set] => 4
[type] => grouped
[category_ids] => Array
(
)
[website_ids] => Array
(
[0] => 1
)
)