本文整理汇总了PHP中soapclient::ImageAttention方法的典型用法代码示例。如果您正苦于以下问题:PHP soapclient::ImageAttention方法的具体用法?PHP soapclient::ImageAttention怎么用?PHP soapclient::ImageAttention使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类soapclient
的用法示例。
在下文中一共展示了soapclient::ImageAttention方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CreateHeatmap
function CreateHeatmap($login, $password, $inputImage, $viewType, $viewDistance, $analysisOptions, $outputOptions)
{
// define the SOAP client using the url for the service
//$client = new soapclient('http://service.feng-gui.com/soap/api.asmx?WSDL',
$client = new soapclient('http://fg11.feng-gui.com/soap/api.asmx?WSDL', array('trace' => 1, 'login' => $login, 'password' => $password));
$param = array('InputImage' => $inputImage, 'ViewType' => $viewType, 'viewDistance' => $viewDistance, 'analysisOptions' => $analysisOptions, 'outputOptions' => $outputOptions);
$response = array();
ini_set("default_socket_timeout", 240);
// PMJ Oct 30 2012 - bump up timeout from 3 minutes to 4 and see what happens
try {
$result = $client->ImageAttention($param);
// passess the results
if (is_soap_fault($result)) {
throw new Exception('SOAP heatmap call unsuccessful.');
}
} catch (Exception $e) {
$response = array('success' => false, 'soap_response' => $client->__getLastResponse(), 'response_headers' => $client->__getLastResponseHeaders());
return $response;
}
$response = array('success' => true, 'image_url' => $result->ImageAttentionResult->OutputImage);
return $response;
}