From 9846d3612e85c44416ffad8d46998b9afcb6d83b Mon Sep 17 00:00:00 2001 From: Grigory Pomadchin Date: Mon, 24 Nov 2014 22:05:56 +0300 Subject: [PATCH] +curl agent --- intaro.intarocrm/classes/general/ICrmOrderActions.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index adaa120b..62baf973 100755 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -1090,12 +1090,16 @@ class ICrmOrderActions */ public static function forkedOrderAgent() { - if(self::isForkable()) { - file_get_contens( + if(self::isForkable()&& is_callable('curl_init')) { + $ch = curl_init(); + curl_setopt($ch,CURLOPT_URL, ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . '/intaro/agent.php' ); - + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + //curl_setopt($ch,CURLOPT_HEADER, true); // headers + curl_exec($ch); + curl_close($ch); } else { self::orderAgent(); }