Code :
- <?php
- $logonfields = "loginname=XXX&password=XXXX&login=D%C3%A9but+de+connexion";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_HEADER, 1); // Get the header
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;MSIE 5.01; Windows -NT 5.0)" );
- curl_setopt($ch, CURLOPT_REFERER, "https://admin.bookings.org/hotel/login.html" );
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_URL,"https://admin.bookings.org/hotel/login.html?loginname=XXX&password=XXX&login=D%C3%A9but+de+connexion" );
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_HEADER, 1); // Get the header
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;MSIE 5.01; Windows NT 5.0)" );
- curl_setopt($ch, CURLOPT_URL,"https://admin.bookings.org/availadmin/index.html?ho=50878" );
- curl_setopt($ch, CURLOPT_REFERER, "https://admin.bookings.org/hotel/login.html" );
- curl_setopt($ch, CURLOPT_HEADER, 1); // Get the header
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;MSIE 5.01; Windows NT 5.0)" );
- curl_setopt($ch, CURLOPT_URL,"https://admin.bookings.org/availadmin/index.html?ho=50878" );
- curl_setopt($ch, CURLOPT_REFERER, "https://admin.bookings.org/hotel/availadmin/index.html?f0hh0=1" );
- $result=curl_exec($ch);
- curl_close($ch);
- echo"$result";
- ?>
|