public function testIndex() { /* Initiate the service class */ $service = new EphorusService(false); /* Get the index address */ $index_address = DLEApi::getSetting('index_address'); if ($index_address == '') { return false; } $curl = curl_init($index_address); curl_setopt($curl, CURLOPT_RETURNTRANSFER, false); curl_setopt($curl, CURLOPT_FAILONERROR, true); if (DLEApi::getProxySetting('host')) { curl_setopt($curl, CURLOPT_PROXY, DLEApi::getProxySetting('host') . ':' . DLEApi::getProxySetting('port')); } if (!curl_exec($curl) || !strpos($index_address, 'wsdl')) { return false; } /* Initiate soap */ $soap_client = $service->initSoapClient($index_address, 'visibility'); /* Try to change file's visibility index */ try { @$soap_client->IndexDocument(array('documentGuid' => '123456-123456-123456-123456', 'indexType' => 2)); return true; } catch (SoapFault $e) { return true; } }