1
0
mirror of synced 2025-01-31 23:31:41 +03:00

+curl agent

This commit is contained in:
Grigory Pomadchin 2014-11-24 22:05:56 +03:00
parent 464e568156
commit 9846d3612e

View File

@ -1090,12 +1090,16 @@ class ICrmOrderActions
*/ */
public static function forkedOrderAgent() { public static function forkedOrderAgent() {
if(self::isForkable()) { if(self::isForkable()&& is_callable('curl_init')) {
file_get_contens( $ch = curl_init();
curl_setopt($ch,CURLOPT_URL,
($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') .
$_SERVER['SERVER_NAME'] . '/intaro/agent.php' $_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 { } else {
self::orderAgent(); self::orderAgent();
} }