我正在寻找使用Expedia API预订的酒店
https://book.api.ean.com/
但网址始终为空,
使用rest / json的详细信息
http://developer.ean.com/docs/hotels/version_3/book_reservation/
我见过一些人遇到同样的问题,想知道是否有人知道这是什么
https://book.api.ean.com/ean- services/rs/hotel/v3/res?cid=55505 &apiKey = xxx&locale = zh_CN&currencyCode = USD&customerUserAgent = Mozilla / 5.0(Windows NT 6.1)AppleWebKit / 535.11(KHTML,like Gecko)Chrome / 17.0.963.83 Safari / 535.11&customerIpAddress = 127.0.0.1&room1 = 1,3&room1FirstName = TestBooking&room1LastName = TestBooking&room1BedTypeId = 13&room1SmokingPreference = NS&room2 = 1,5&room2FirstName = TestBooking&room2LastName = TestBooking&room2BedTypeId = 13&room2SmokingPreference = NS&email = xxx&firstName = TestBooking&lastName = TestBooking&homePhone = TestBooking&credit&Card = Credit&Card = EditCard&Credit&Card = Editbook&Credit&Card = = 11&creditCardExpirationYear = 2012&address1 = travelnow&city = Bellevue&stateProvinceCode = WA&countryCode = US&postalCode = 98004&customerSessionId = 0ABAA871-3127-A913-6642-A1F86D902E2B&hotelId = 211540&arrivalDate = 12/10/2012&departureDate = 12/12/2012&supplierType = E&rateKey = d03a8d29-1df2-4436-81d6-6b37eb4dcb78&rateTypeCode = 1279169&chargeableRate = 803.04
包括或排除minorrev似乎并没有多大区别
尝试对每个querystring参数进行urlencoding:
customerUserAgent=Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11 arrivalDate=12/10/2012
customerUserAgent网址参数应采用网址编码:
customerUserAgent=Mozilla%2F5.0%20(Windows%20NT%206.1)%20AppleWebKit%2F535.11%20(KHTML%2C%20like%20Gecko)%20Chrome%2F17.0.963.83%20Safari%2F535.11 arrivalDate=12%2F10%2F2012
查看PHP的urlencode,以获取更多信息。
另外,请确保删除每个查询字符串参数之间的空格,而不确定它是否是复制/粘贴问题。