PHP Example #1: Authenticate Web User

PHP

<?php
			
$soapClient = new SoapClient("https://ws.cyberridge.com/NLSWebService/Service.asmx?WSDL", array(
	"login"      => "nls.local\\user",
	"password"   => "password",
	"trace"      => 1,
	"exceptions" => 0));
		
// Call RemoteFunction ()
$error = 0;
try {	
	// Setup the RemoteFunction parameters	
	$ap_param = array(
		  'db_type'     =>    'MSSQL',
		  'server_name'     =>    ' NlsSql08',      
		  'database_name'     =>    'Database_Name',
		  'username'     =>    'webuser',
		  'password'     =>    'webuserpassword'
		  );
	$info = $soapClient->__call("NLSAuthenticate", array($ap_param));
        		
	print "<pre>\n";
//  print "Request: \n".htmlspecialchars($soapClient->__getLastRequest()) ."\n";
	print "Response: \n".htmlspecialchars($soapClient->__getLastResponse())."\n";
	print "</pre>";
        
} catch (SoapFault $fault) {
        $error = 1;
}

?>