Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7792355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:09:30+00:00 2026-06-01T22:09:30+00:00

I am working with Expedia’s api and I am trying to do a test

  • 0

I am working with Expedia’s api and I am trying to do a test booking. I have to call a https url. I have been able to make connections to all other normal http request, but now I am stuck. Here is how I am calling the page. all the php values from my form are correct but I get nothing in the xml file..I mean nothing no errors, nothing! I am truly stuck and do not know what to do. Here is my php code:

$ch = curl_init(); 
$fp = fopen('bookit.xml','w'); 
curl_setopt($ch, CURLOPT_URL, "https://book.api.ean.com/ean-services/rs/hotel/v3/res?cid=55505&minorRev=13&apiKey=4sr8d8bsn75tpcuja6ypx5g3&locale=en_US&currencyCode=USD&customerIpAddress=10.184.2.9&customerUserAgent=Mozilla/5.0+(Windows+NT+6.1)+AppleWebKit/535.11+(KHTML,+like+Gecko)+Chrome/17.0.963.79+Safari/535.11&customerSessionId=&locale=en_US&currencyCode=USD&xml=<HotelRoomReservationRequest><hotelId>".$hid."</hotelId><arrivalDate>".$arrive."</arrivalDate><departureDate>".$depart."</departureDate><supplierType>".$supplier."</supplierType><rateKey>".$rkey."</rateKey><rateCode>".$ratecode."</rateCode><roomTypeCode>".$roomcode."</roomTypeCode><chargeableRate>".$total."</chargeableRate><RoomGroup><Room><numberOfAdults>".$adults."</numberOfAdults><numberOfChildren>".$children."</numberOfChildren><childAges>".$childages."</childAges><firstName>".$fname."</firstName><lastName>".$lname."</lastName><smokingPreference>".$smoking."</smokingPreference></Room></RoomGroup><ReservationInfo><email>".$email."</email><firstName>".$ccname."</firstName><lastName>".$cclast."</lastName><homePhone>".$phone."</homePhone><workPhone></workPhone><creditCardType>".$cc."</creditCardType><creditCardNumber>".$ccnumber."</creditCardNumber><creditCardExpirationMonth>".$exmonth."</creditCardExpirationMonth><creditCardExpirationYear>".$exyear."</creditCardExpirationYear><creditCardIdentifier>".$ccsecure."</creditCardIdentifier></ReservationInfo><AddressInfo><address1>".$street1."</address1><city>".$city."</city><stateProvinceCode>AZ</stateProvinceCode><countryCode>".$country."</countryCode><postalCode>".$zip."</postalCode></AddressInfo></HotelRoomReservationRequest>");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/xml'));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); 
curl_setopt($ch, CURLOPT_HEADER, 0); 
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");  
$val = curl_exec($ch); 
curl_close($ch);//Close curl session 
fclose($fp); //Close file overwrite 
var_dump($val);
$data = simplexml_load_file('bookit.xml');

And I like I said I get nothing at all. I have checked all the code and I do not see a problem and the url is correct.. any help would be so greatly appreciated. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:09:32+00:00Added an answer on June 1, 2026 at 10:09 pm

    The customer IP addr is 10.184.2.9, you say? I’m skeptical of that.

    Immediately after the curl_exec, but before you close $ch, echo the output of curl_error($ch). Is there anything useful there?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working with an API that can handle multiple connections (i.e. sessions), each of these
Working live URL showing problem: http://69.24.73.172/demos/newDemo/test.html The HTML : <div class="small-vote"> <a href="#" class="s
Working on a project at the moment and we have to implement soft deletion
Working on calling a C function from my asm project. I'm trying to push
Working with the Box2djs plugin here: http://www.crackin.com/dev/mms/physics/ ... and all I'm trying to do
Working with an API where I need to send a value over in an
Working : urlpatterns = patterns('', (r'^$', views.index), (r'^test/$|test/(\d+)/$', views.test_page), (r'^(name)/$', views.index), (r'^(username)/$', views.index), )
Working with a Lucene index, I have a standard document format that looks something
Working in Java: I have a JFrame class, and separate classes for my two
Working on game. I have a movable basket and a - for now -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.