+curl agent
This commit is contained in:
parent
464e568156
commit
9846d3612e
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user