SOAP sample new5

Source

// This sample show ephemeris of all classical objects where name is starting with "L4" observed at palomar mountain (675) the 27 apr 2011
$client = new SoapClient('http://tnodb.obs-besancon.fr/ws/ws_bdp.wsdl');
if ($client->getAvailability()) {
	$datas = $client->predict(

		// We don't have any cookie
		'',

		// Now selection criterias
		array(
			'objectName'=>'L4v%', // Names stating by L4v
			// TODO classical objects
		),

		// Dates (-0.5 because PHP compute JD not correctly)
		array(
			unixtojd(gmmktime(0,0,0,4,27,2011))-0.5
		),

		'675'
	);
	var_dump($datas);
} else {
	echo 'Database is temporarily unavailable';
}

Result

array(17) {
  [0]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:05:09.0782"
    ["icrsDec"]=>
    string(13) "+16:55:00.469"
    ["icrsErrA"]=>
    string(6) "4.7025"
    ["icrsErrB"]=>
    string(6) "0.5325"
    ["icrsErrPA"]=>
    string(5) "73.80"
    ["objName"]=>
    string(5) "L4v03"
  }
  [1]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:23:12.1259"
    ["icrsDec"]=>
    string(13) "+21:24:18.907"
    ["icrsErrA"]=>
    string(6) "4.8170"
    ["icrsErrB"]=>
    string(6) "0.6029"
    ["icrsErrPA"]=>
    string(5) "61.00"
    ["objName"]=>
    string(5) "L4v04"
  }
  [2]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:13:03.2976"
    ["icrsDec"]=>
    string(13) "+16:52:02.159"
    ["icrsErrA"]=>
    string(6) "5.0582"
    ["icrsErrB"]=>
    string(6) "0.6222"
    ["icrsErrPA"]=>
    string(5) "80.12"
    ["objName"]=>
    string(5) "L4v05"
  }
  [3]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:28:42.6215"
    ["icrsDec"]=>
    string(13) "+18:35:07.921"
    ["icrsErrA"]=>
    string(6) "4.4949"
    ["icrsErrB"]=>
    string(6) "0.5511"
    ["icrsErrPA"]=>
    string(5) "74.28"
    ["objName"]=>
    string(5) "L4v06"
  }
  [4]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "02:59:50.5073"
    ["icrsDec"]=>
    string(13) "+17:44:11.002"
    ["icrsErrA"]=>
    string(6) "0.8097"
    ["icrsErrB"]=>
    string(6) "0.2131"
    ["icrsErrPA"]=>
    string(5) "65.85"
    ["objName"]=>
    string(5) "L4v08"
  }
  [5]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:18:02.1901"
    ["icrsDec"]=>
    string(13) "+19:04:20.029"
    ["icrsErrA"]=>
    string(6) "0.4669"
    ["icrsErrB"]=>
    string(6) "0.2314"
    ["icrsErrPA"]=>
    string(5) "71.59"
    ["objName"]=>
    string(5) "L4v09"
  }
  [6]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:10:52.1802"
    ["icrsDec"]=>
    string(13) "+18:00:42.094"
    ["icrsErrA"]=>
    string(6) "0.3958"
    ["icrsErrB"]=>
    string(6) "0.1884"
    ["icrsErrPA"]=>
    string(5) "74.82"
    ["objName"]=>
    string(5) "L4v10"
  }
  [7]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:44:57.1790"
    ["icrsDec"]=>
    string(13) "+24:03:25.061"
    ["icrsErrA"]=>
    string(6) "1.7898"
    ["icrsErrB"]=>
    string(6) "0.2734"
    ["icrsErrPA"]=>
    string(5) "65.72"
    ["objName"]=>
    string(5) "L4v11"
  }
  [8]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:37:44.2218"
    ["icrsDec"]=>
    string(13) "+23:04:49.289"
    ["icrsErrA"]=>
    string(6) "0.4001"
    ["icrsErrB"]=>
    string(6) "0.1836"
    ["icrsErrPA"]=>
    string(5) "66.96"
    ["objName"]=>
    string(5) "L4v12"
  }
  [9]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:32:46.6648"
    ["icrsDec"]=>
    string(13) "+23:55:14.766"
    ["icrsErrA"]=>
    string(6) "0.3869"
    ["icrsErrB"]=>
    string(6) "0.2002"
    ["icrsErrPA"]=>
    string(5) "55.60"
    ["objName"]=>
    string(5) "L4v13"
  }
  [10]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:22:18.5730"
    ["icrsDec"]=>
    string(13) "+19:37:39.576"
    ["icrsErrA"]=>
    string(6) "7.2747"
    ["icrsErrB"]=>
    string(6) "0.3263"
    ["icrsErrPA"]=>
    string(5) "72.06"
    ["objName"]=>
    string(5) "L4v14"
  }
  [11]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "04:18:29.2533"
    ["icrsDec"]=>
    string(13) "+16:24:31.931"
    ["icrsErrA"]=>
    string(6) "0.1138"
    ["icrsErrB"]=>
    string(6) "0.1011"
    ["icrsErrPA"]=>
    string(5) "68.26"
    ["objName"]=>
    string(5) "L4v15"
  }
  [12]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:47:27.5934"
    ["icrsDec"]=>
    string(13) "+16:59:32.416"
    ["icrsErrA"]=>
    string(6) "0.4440"
    ["icrsErrB"]=>
    string(6) "0.2030"
    ["icrsErrPA"]=>
    string(5) "86.14"
    ["objName"]=>
    string(5) "L4v18"
  }
  [13]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:03:35.0161"
    ["icrsDec"]=>
    string(13) "+18:30:09.812"
    ["icrsErrA"]=>
    string(10) "19561.5001"
    ["icrsErrB"]=>
    string(10) "12130.6978"
    ["icrsErrPA"]=>
    string(6) "139.70"
    ["objName"]=>
    string(7) "l4v07nt"
  }
  [14]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:01:43.0822"
    ["icrsDec"]=>
    string(13) "+16:43:17.028"
    ["icrsErrA"]=>
    string(10) "18751.6596"
    ["icrsErrB"]=>
    string(10) "12787.8066"
    ["icrsErrPA"]=>
    string(6) "178.42"
    ["objName"]=>
    string(7) "l4v16nt"
  }
  [15]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:01:35.8350"
    ["icrsDec"]=>
    string(13) "+23:54:45.906"
    ["icrsErrA"]=>
    string(10) "39085.3802"
    ["icrsErrB"]=>
    string(10) "12197.6859"
    ["icrsErrPA"]=>
    string(5) "98.47"
    ["objName"]=>
    string(7) "l4v17nt"
  }
  [16]=>
  array(7) {
    ["atTime"]=>
    string(16) "2011 04 27.00000"
    ["icrsRA"]=>
    string(13) "03:50:15.9158"
    ["icrsDec"]=>
    string(13) "+18:12:02.950"
    ["icrsErrA"]=>
    string(10) "25832.3028"
    ["icrsErrB"]=>
    string(10) "18360.1657"
    ["icrsErrPA"]=>
    string(5) "71.95"
    ["objName"]=>
    string(7) "l4v19nt"
  }
}

Back to documentation