Username = $username; $params->Password = $password; $params->TransactionID = $transactionid; $params->Image = ''; $faxImage = $client->GetFaxImage($params); if ($faxImage->GetFaxImageResult == 0){ $filename = $transactionid . '.tif'; $content = $faxImage->Image; if (!$handle = fopen($filename, 'w')) { echo "Cannot open file ($filename)"; exit; } if (fwrite($handle, $content) === FALSE) { echo "Cannot write to file $filename"; exit; } fclose($handle); } else { // Problem with Web Service call // Do something } ?>