From 4833ff388b6faeba8a2b56e9ae4472f01e3f9aed Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 13 Sep 2018 18:25:06 +0900 Subject: [PATCH] =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=94=EB=93=9C=20SMS=20?= =?UTF-8?q?=EC=9D=91=EB=8B=B5=20=EC=97=86=EC=9D=84=EC=8B=9C=20=EC=A7=80?= =?UTF-8?q?=EC=97=B0=20=EC=8B=9C=EA=B0=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 6 +++--- lib/icode.lms.lib.php | 2 +- lib/icode.sms.lib.php | 4 ++-- plugin/sms5/sms5.lib.php | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 963701e47..77b78b5e9 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2678,7 +2678,7 @@ function get_qa_config($fld='*') // get_sock 함수 대체 if (!function_exists("get_sock")) { - function get_sock($url) + function get_sock($url, $timeout=30) { // host 와 uri 를 분리 //if (ereg("http://([a-zA-Z0-9_\-\.]+)([^<]*)", $url, $res)) @@ -2689,7 +2689,7 @@ if (!function_exists("get_sock")) { } // 80번 포트로 소캣접속 시도 - $fp = fsockopen ($host, 80, $errno, $errstr, 30); + $fp = fsockopen ($host, 80, $errno, $errstr, $timeout); if (!$fp) { //die("$errstr ($errno)\n"); @@ -2983,7 +2983,7 @@ function replace_filename($name) // 아이코드 사용자정보 function get_icode_userinfo($id, $pass) { - $res = get_sock('http://www.icodekorea.com/res/userinfo.php?userid='.$id.'&userpw='.$pass); + $res = get_sock('http://www.icodekorea.com/res/userinfo.php?userid='.$id.'&userpw='.$pass, 2); $res = explode(';', $res); $userinfo = array( 'code' => $res[0], // 결과코드 diff --git a/lib/icode.lms.lib.php b/lib/icode.lms.lib.php index e255d1d7b..f7bb6f361 100644 --- a/lib/icode.lms.lib.php +++ b/lib/icode.lms.lib.php @@ -119,7 +119,7 @@ class LMS { function Send() { $fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2); if (!$fsocket) return false; - set_time_limit(300); + set_time_limit(60); foreach($this->Data as $puts) { fputs($fsocket, $puts); diff --git a/lib/icode.sms.lib.php b/lib/icode.sms.lib.php index 0ce3e6643..a3bee6613 100644 --- a/lib/icode.sms.lib.php +++ b/lib/icode.sms.lib.php @@ -122,9 +122,9 @@ class SMS { } function Send () { - $fp=@fsockopen(trim($this->SMS_Server),trim($this->SMS_Port)); + $fp=@fsockopen(trim($this->SMS_Server),trim($this->SMS_Port), $errno, $errstr, 2); if (!$fp) return false; - set_time_limit(300); + set_time_limit(60); ## php4.3.10일경우 ## zend 최신버전으로 업해주세요.. diff --git a/plugin/sms5/sms5.lib.php b/plugin/sms5/sms5.lib.php index 2cceaa9bf..6f872e300 100644 --- a/plugin/sms5/sms5.lib.php +++ b/plugin/sms5/sms5.lib.php @@ -267,7 +267,7 @@ if($config['cf_sms_type'] == 'LMS') { $fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2); if (!$fsocket) return false; - set_time_limit(300); + set_time_limit(60); foreach($this->Data as $puts) { fputs($fsocket, $puts); @@ -436,9 +436,9 @@ if($config['cf_sms_type'] == 'LMS') { exit; } - $fsocket=fsockopen($this->SMS_Server,$this->SMS_Port); + $fsocket=fsockopen($this->SMS_Server,$this->SMS_Port, $errno, $errstr, 2); if (!$fsocket) return false; - set_time_limit(300); + set_time_limit(60); ## php4.3.10일경우 ## zend 최신버전으로 업해주세요..