Skip to content

Commit

Permalink
Update Expedia.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dyatlov committed Mar 6, 2014
1 parent 53174a0 commit 38be886
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Dyatlov/Expedia/Expedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

namespace Dyatlov\Expedia;

require_once dirname(__FILE__) . '/Exception.php';

class Expedia
{
/**
Expand Down Expand Up @@ -94,10 +96,10 @@ class Expedia
protected $verbose_log;

/**
* Query method: POST or GET
*
* @var string
*/
* Query method: POST or GET
*
* @var string
*/
protected $method = 'GET';

protected $protocol = 'http://';
Expand Down Expand Up @@ -303,7 +305,7 @@ public function safeCall($name, $args)

$url .= '?' . http_build_query($data);

if( $this->method == 'GET' ) {
if( $this->method == 'GET' ) {
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
}
else {
Expand All @@ -315,12 +317,12 @@ public function safeCall($name, $args)
$header[] = "Accept: application/json";
$header[] = "Accept-Encoding: gzip";
$header[] = "Content-length: 0";


curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

Expand Down

0 comments on commit 38be886

Please sign in to comment.