From b54350ff2f09d8202cf2931895bba8dced4dcf21 Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Sun, 13 Apr 2014 13:58:37 +0400 Subject: [PATCH 1/3] Fix warning of open_basedir --- lib/IntaroCrm/RestApi.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/IntaroCrm/RestApi.php b/lib/IntaroCrm/RestApi.php index 047673a..1ca5373 100644 --- a/lib/IntaroCrm/RestApi.php +++ b/lib/IntaroCrm/RestApi.php @@ -557,7 +557,7 @@ class RestApi $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FAILONERROR, FALSE); - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects + //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s @@ -598,4 +598,4 @@ class RestApi return reset($result); } -} \ No newline at end of file +} From 3fcfa535deafeb719a0e71fb13457233503cd456 Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Mon, 21 Apr 2014 14:56:52 +0400 Subject: [PATCH 2/3] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 38bb786..5ac218b 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,9 @@ Requirements Installation ------------ -Add IntaroCRM REST API client in your composer.json: +1) Install [composer](https://getcomposer.org/download/) into the project directory. +2) Add IntaroCRM REST API client in your composer.json: ```js { "require": { @@ -21,6 +22,10 @@ Add IntaroCRM REST API client in your composer.json: } } ``` +3) Use command `php composer.phar update intarocrm/rest-api-client` to install new vendor into `vendor/` folder. + + + Usage ------------ From 7345e7f6cd119e116a909985acc525caddc6ab89 Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Tue, 17 Jun 2014 07:32:13 +0400 Subject: [PATCH 3/3] Update RestApi.php --- lib/IntaroCrm/RestApi.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/IntaroCrm/RestApi.php b/lib/IntaroCrm/RestApi.php index 1ca5373..18319b5 100644 --- a/lib/IntaroCrm/RestApi.php +++ b/lib/IntaroCrm/RestApi.php @@ -560,6 +560,8 @@ class RestApi //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s + //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + if ($method == 'POST') {