아이코드 SMS 응답 없을시 지연 시간 수정
This commit is contained in:
@ -2678,7 +2678,7 @@ function get_qa_config($fld='*')
|
|||||||
|
|
||||||
// get_sock 함수 대체
|
// get_sock 함수 대체
|
||||||
if (!function_exists("get_sock")) {
|
if (!function_exists("get_sock")) {
|
||||||
function get_sock($url)
|
function get_sock($url, $timeout=30)
|
||||||
{
|
{
|
||||||
// host 와 uri 를 분리
|
// host 와 uri 를 분리
|
||||||
//if (ereg("http://([a-zA-Z0-9_\-\.]+)([^<]*)", $url, $res))
|
//if (ereg("http://([a-zA-Z0-9_\-\.]+)([^<]*)", $url, $res))
|
||||||
@ -2689,7 +2689,7 @@ if (!function_exists("get_sock")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 80번 포트로 소캣접속 시도
|
// 80번 포트로 소캣접속 시도
|
||||||
$fp = fsockopen ($host, 80, $errno, $errstr, 30);
|
$fp = fsockopen ($host, 80, $errno, $errstr, $timeout);
|
||||||
if (!$fp)
|
if (!$fp)
|
||||||
{
|
{
|
||||||
//die("$errstr ($errno)\n");
|
//die("$errstr ($errno)\n");
|
||||||
@ -2983,7 +2983,7 @@ function replace_filename($name)
|
|||||||
// 아이코드 사용자정보
|
// 아이코드 사용자정보
|
||||||
function get_icode_userinfo($id, $pass)
|
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);
|
$res = explode(';', $res);
|
||||||
$userinfo = array(
|
$userinfo = array(
|
||||||
'code' => $res[0], // 결과코드
|
'code' => $res[0], // 결과코드
|
||||||
|
|||||||
@ -119,7 +119,7 @@ class LMS {
|
|||||||
function Send() {
|
function Send() {
|
||||||
$fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
$fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
||||||
if (!$fsocket) return false;
|
if (!$fsocket) return false;
|
||||||
set_time_limit(300);
|
set_time_limit(60);
|
||||||
|
|
||||||
foreach($this->Data as $puts) {
|
foreach($this->Data as $puts) {
|
||||||
fputs($fsocket, $puts);
|
fputs($fsocket, $puts);
|
||||||
|
|||||||
@ -122,9 +122,9 @@ class SMS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Send () {
|
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;
|
if (!$fp) return false;
|
||||||
set_time_limit(300);
|
set_time_limit(60);
|
||||||
|
|
||||||
## php4.3.10일경우
|
## php4.3.10일경우
|
||||||
## zend 최신버전으로 업해주세요..
|
## zend 최신버전으로 업해주세요..
|
||||||
|
|||||||
@ -267,7 +267,7 @@ if($config['cf_sms_type'] == 'LMS') {
|
|||||||
|
|
||||||
$fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
$fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
||||||
if (!$fsocket) return false;
|
if (!$fsocket) return false;
|
||||||
set_time_limit(300);
|
set_time_limit(60);
|
||||||
|
|
||||||
foreach($this->Data as $puts) {
|
foreach($this->Data as $puts) {
|
||||||
fputs($fsocket, $puts);
|
fputs($fsocket, $puts);
|
||||||
@ -436,9 +436,9 @@ if($config['cf_sms_type'] == 'LMS') {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fsocket=fsockopen($this->SMS_Server,$this->SMS_Port);
|
$fsocket=fsockopen($this->SMS_Server,$this->SMS_Port, $errno, $errstr, 2);
|
||||||
if (!$fsocket) return false;
|
if (!$fsocket) return false;
|
||||||
set_time_limit(300);
|
set_time_limit(60);
|
||||||
|
|
||||||
## php4.3.10일경우
|
## php4.3.10일경우
|
||||||
## zend 최신버전으로 업해주세요..
|
## zend 최신버전으로 업해주세요..
|
||||||
|
|||||||
Reference in New Issue
Block a user