I want this script is gonna waiting response until success, so do not showing invalid result. This is the script...\[code\]private function verifyXmlResponse($response) { if ($response === False) { throw new Exception("Could not connect to database"); } else { if (isset($response->Items->Item->ItemAttributes->Title)) { return ($response); } else { throw new Exception("invalid xml"); } }\[/code\]