Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Get cURL resource
- $curl = curl_init();
- // Set some options - we are passing in a useragent too here
- curl_setopt_array($curl, array(
- CURLOPT_RETURNTRANSFER => 1,
- CURLOPT_URL => 'http://www.batavia-air.com/public/etiket/includes/class/booking/template/cariBookAjaxPros2.php',
- CURLOPT_USERAGENT => 'Sample CURL Request',
- CURLOPT_POST => 1,
- CURLOPT_POSTFIELDS => array(
- page => 'booking',
- ajax_type => 'non_ajax',
- radio => 'flight',
- ruteBerangkat => 'CGK',
- ruteTujuan => 'AMQ',
- ruteKembali => 'kembali',
- tglBerangkatPergi => '23',
- blnthnBerangkatPergi => '12/12',
- kalenderPergi => '',
- jmlPenumpang => '1',
- jmlInfant => '0',
- page => 'booking'
- )
- ));
- // Send the request & save response to $resp
- $resp = curl_exec($curl);
- if(!curl_exec($curl)){
- die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
- }
- // Close request to clear up some resources
- curl_close($curl);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement