Well here is the API I\'m trying to use: http://www.hotelscombined.com/api/LiveRates.asmx?op=HotelSearch
Here is the code I\'ve tried:
$client = new
Try making a PHP object, then referencing that object in your soap call.
class HotelRequest {
public $apiKey;
public $userID;
public $userAgent;
public $userIPAddress;
public $hotelID;
public $checkin;
public $checkout;
public $guests;
public $rooms;
public $languageCode;
public $displayCurrency;
public $timeOutInSeconds;
}
//set the values of the object...
$hotelRequestObject = new HotelRequest();
$hotelRequestObject->apiKey = "API_KEY";
//etc...
$client = new SoapClient('http://www.hotelscombined.com/api/LiveRates.asmx?WSDL',
array("classmap" => array("HotelSearchRequest" => "HotelRequest")));
$result = $client->HotelSearch($hotelRequestObject);
var_dump($result);