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; }