<?php
// Needed to remove PHP's execution timelimit of 30 secs.  Some API calls can take longer.
set_time_limit(0); 
 
$Api = new SoapClient("https://api.fast-serve.net/api.svc?wsdl");
 
// Assign it to prevent warnings
$params = null;
 
// Params must be named as per the API Docs and are case sensitive
$params->CompanyId = COMPANYID HERE AS INTEGER;
$params->ApiKey = "API KEY HERE";
 
// Intellisense will not work for these class methods.
// They are also case sensitive.
$ApiResult = $Api->GetAllProducts($params);
$products = $ApiResult->GetAllProductsResult->Product;
 
foreach($products as $product){
    echo "Product Name: " . $product->Title . "<br />";
}
?>