Jump to content

Get Orbitz search result with CURL?


killuagdt

Recommended Posts

I am using php 5.3.2 with ISS7. I am currently looking to do get search result from Orbitz. This is what LiveHeader of firefox send me:

/App/SubmitQuickSearch?z=24ad&r=h searchType=air&source=advanced&searchTab=&dpHidden=&tripLength=7&searchMethodHidden=find&expandTravelers=false&WebLogicSession=A2B3ADE3E700AE0EBE74527EE28F1475&orbotHotelSearchTypeKey=+&previousBot=&currentBot=&isBot=true&isBasicDataPersistenceOnly=true&isFlex=&flightType=roundtrip&origin=lax&destination=las&startDate=08%2F30%2F10&useStartCal=true&startTimeType=Depart&startTime=Anytime&endDate=08%2F31%2F10&useEndCal=true&endTimeType=Depart&endTime=Anytime&adults=1&seniors=0&youths=0&children=0&infantsWithoutSeat=0&infantsWithSeat=0&Search.x=true&preferencingType=airline&carrier1=&carrier2=&carrier3=&alliance=&cabinClass=Economy

 

when I try to search a flight from Lax to Las on 30 and 31. I try this code to get the result:

<?php
    $url = "http://www.orbitz.com/App/SubmitQuickSearch?z=24ad&r=h";
    $ch = curl_init(); 
curl_setopt($ch,CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'searchType=air&source=advanced&searchTab=&dpHidden=&tripLength=7&searchMethodHidden=find&expandTravelers=false&WebLogicSession=A2B3ADE3E700AE0EBE74527EE28F1475&orbotHotelSearchTypeKey=+&previousBot=&currentBot=&isBot=true&isBasicDataPersistenceOnly=true&isFlex=&flightType=roundtrip&origin=lax&destination=las&startDate=08%2F30%2F10&useStartCal=true&startTimeType=Depart&startTime=Anytime&endDate=08%2F31%2F10&useEndCal=true&endTimeType=Depart&endTime=Anytime&adults=1&seniors=0&youths=0&children=0&infantsWithoutSeat=0&infantsWithSeat=0&Search.x=true&preferencingType=airline&carrier1=&carrier2=&carrier3=&alliance=&cabinClass=Economy');
    $output = curl_exec($ch);
curl_close($ch);
echo $output;
?>

 

but I received "We’ve noticed there hasn’t been any activity for a while. Please search again for the latest results." error from Orbitz. I can actually see the directing screen before seeing the error. So could you please help me with this problem? I'd really like to know how Bookingbuddy does this. Thank you very much for your help.

Link to comment
https://forums.phpfreaks.com/topic/211830-get-orbitz-search-result-with-curl/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.