SOAP sample cookie

Source

$client = new SoapClient('http://tnodb.obs-besancon.fr/ws/ws_bdp.wsdl');
if ($client->getAvailability()) {


	$cookie = $client->getNewCookie();
	echo "Your cookie is $cookie\n\n";


	echo "Get info about datas available :\n";
	var_dump($client->getCookieDetails($cookie));
	echo "\n";



	// Add OSSOS to the cookie
	/*
	$client->addOSSOStoCookie($cookie, 'login', 'password');
	*/
	// ... ok it is commented and it is not a real login/pass so OSSOS remains '0'


	echo "Get info about datas available :\n";
	var_dump($client->getCookieDetails($cookie));
	echo "\n";


	echo "Example of usage :\n";
	$datas = $client->getNumberOf('orbit', $cookie, array(), 'survey');
	var_dump($datas);
	echo "\n";


	// Remove the cookie
	$client->removeCookie($cookie);

} else {
	echo 'Database is temporarily unavailable';
}

Result

Your cookie is EDVP58l9O1pGsnwTI5N_3xTqd5xMSRjd

Get info about datas available :
array(1) {
  ["ossos"]=>
  string(1) "0"
}

Get info about datas available :
array(1) {
  ["ossos"]=>
  string(1) "0"
}

Example of usage :
array(7) {
  ["CFEPS"]=>
  string(3) "179"
  ["HiLat"]=>
  string(2) "14"
  ["MA"]=>
  string(2) "77"
  ["NONE"]=>
  string(2) "21"
  ["NONE,CFEPS"]=>
  string(1) "4"
  ["NONE,HiLat"]=>
  string(1) "7"
  ["OSSOS"]=>
  string(2) "85"
}

Back to documentation