我已经在我的php网站上实施了Expedia Air Api,我已经向expedia发送了空中可用性请求,我得到了结果。但结果中的价格与expedia.com非常不同。我想显示正确的结果。请参阅下面的代码
<?php $post_string = 'cid=mycid&resType=air&intfc=ws&apiKey=wuxk5avnwqw9mygz8rjk8u5w&xml=<AirSessionRequest method="getAirAvailability"><AirAvailabilityQuery><originCityCode>COK</originCityCode><destinationCityCode>BLR</destinationCityCode><departureDateTime>06/03/2012 07:00 PM</departureDateTime><fareClass>B</fareClass><tripType>O</tripType><currencyCode>INR</currencyCode><Passengers><adultPassengers>1</adultPassengers></Passengers><xmlResultFormat>2</xmlResultFormat><searchType>2</searchType></AirAvailabilityQuery></AirSessionRequest>';
$path = "http://api.ean.com/ean-services/rs/air/200919/xmlinterface.jsp"; //Relative path to the file with $_POST parsing
$ch = curl_init($path);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string); //Send the data to the file
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$val = curl_exec($ch);
curl_close($ch); //Close curl session
$fp = fopen('data.xml', 'w+');
fwrite($fp, $val);
fclose($fp);
我的结果价格与EXPEDIA.COM不同。为什么这个?如果我误解了我如何从
中找到PRIE价值<AirAvailabilityResults size='16'>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>183.0</nativeBaseFare>
<nativeTotalPrice>241.0</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>9058.5</displayBaseFare>
<displayTotalPrice>11929.5</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>AI519</segmentKey>
<fareClass> J</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>183.0</nativeBaseFare>
<nativeTotalPrice>241.0</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>9058.5</displayBaseFare>
<displayTotalPrice>11929.5</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>AI509</segmentKey>
<fareClass> J</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>209.00002</nativeBaseFare>
<nativeTotalPrice>274.2</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>10345.5</displayBaseFare>
<displayTotalPrice>13572.9</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2306</segmentKey>
<fareClass> I</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>252.0</nativeBaseFare>
<nativeTotalPrice>364.4</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>12474.0</displayBaseFare>
<displayTotalPrice>18037.8</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2730</segmentKey>
<fareClass> W</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2307</segmentKey>
<fareClass> I</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>262.0</nativeBaseFare>
<nativeTotalPrice>383.0</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>12969.0</displayBaseFare>
<displayTotalPrice>18958.5</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2732</segmentKey>
<fareClass> W</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2376</segmentKey>
<fareClass> Z</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>271.0</nativeBaseFare>
<nativeTotalPrice>393.0</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>13414.5</displayBaseFare>
<displayTotalPrice>19453.5</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2370</segmentKey>
<fareClass> O</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2312</segmentKey>
<fareClass> Z</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>290.0</nativeBaseFare>
<nativeTotalPrice>402.9</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>14355.0</displayBaseFare>
<displayTotalPrice>19943.55</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2329</segmentKey>
<fareClass> Z</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>S2234</segmentKey>
<fareClass> G</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>291.0</nativeBaseFare>
<nativeTotalPrice>404.0</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>14404.5</displayBaseFare>
<displayTotalPrice>19998.0</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2329</segmentKey>
<fareClass> Z</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>S23351</segmentKey>
<fareClass> G</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>290.0</nativeBaseFare>
<nativeTotalPrice>406.3</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>14355.0</displayBaseFare>
<displayTotalPrice>20111.85</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2329</segmentKey>
<fareClass> Z</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W7008</segmentKey>
<fareClass> W</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>339.0</nativeBaseFare>
<nativeTotalPrice>456.9</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>16780.5</displayBaseFare>
<displayTotalPrice>22616.55</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2730</segmentKey>
<fareClass> N</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>AI519</segmentKey>
<fareClass> C</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>462.99997</nativeBaseFare>
<nativeTotalPrice>592.6</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>22918.5</displayBaseFare>
<displayTotalPrice>29333.7</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>AI519</segmentKey>
<fareClass> C</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2713</segmentKey>
<fareClass> N</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>498.0</nativeBaseFare>
<nativeTotalPrice>600.5</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>24651.0</displayBaseFare>
<displayTotalPrice>29724.75</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>UL166</segmentKey>
<fareClass> J</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>UL171</segmentKey>
<fareClass> J</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>498.0</nativeBaseFare>
<nativeTotalPrice>600.5</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>24651.0</displayBaseFare>
<displayTotalPrice>29724.75</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>UL168</segmentKey>
<fareClass> J</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>UL171</segmentKey>
<fareClass> J</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>474.00003</nativeBaseFare>
<nativeTotalPrice>612.4</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>23463.0</displayBaseFare>
<displayTotalPrice>30313.8</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2370</segmentKey>
<fareClass> N</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>AI518</segmentKey>
<fareClass> C</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>528.0</nativeBaseFare>
<nativeTotalPrice>664.3</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>26136.0</displayBaseFare>
<displayTotalPrice>32882.85</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>AI519</segmentKey>
<fareClass> C</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2307</segmentKey>
<fareClass> I</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<AirAvailabilityReply>
<supplierType>S</supplierType>
<RateInfo>
<nativeBaseFare>599.0</nativeBaseFare>
<nativeTotalPrice>717.6</nativeTotalPrice>
<nativeCurrencyCode>USD</nativeCurrencyCode>
<displayBaseFare>29650.5</displayBaseFare>
<displayTotalPrice>35521.2</displayTotalPrice>
<displayCurrencyCode>INR</displayCurrencyCode>
</RateInfo>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>UL166</segmentKey>
<fareClass> J</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>UL127</segmentKey>
<fareClass> C</fareClass>
</FlightSegment>
<FlightSegment>
<segmentOutgoing>true</segmentOutgoing>
<segmentKey>9W2713</segmentKey>
<fareClass> N</fareClass>
</FlightSegment>
<tripType>O</tripType>
<ticketType>E</ticketType>
</AirAvailabilityReply>
<cacheKey>1206cebb:135d71daacc:-6a55</cacheKey>
<cacheLocation>10.186.168.42:7302</cacheLocation>
</AirAvailabilityResults>
请注意我已从此处删除了分段列表
请回复。或任何其他良好的API实施空中搜索和预订
请帮助我。我有这个问题的SERIOS问题