Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
haishi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
haishi
Commits
95915784
Commit
95915784
authored
Mar 06, 2020
by
liuhailong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://mindant.cn:9999/ice/haishi
parents
c2feef2d
aaf34c6a
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
522 additions
and
100 deletions
+522
-100
admin/themes/simplebootx/Admin/Configprivate/index.html
+18
-1
admin/themes/simplebootx/Admin/Userauth/edit3.html
+1
-1
api/Appapi/Api/Charge.php
+1
-1
api/Appapi/Api/Live.php
+7
-7
api/Appapi/Api/User.php
+159
-0
api/Appapi/Model/Home.php
+1
-1
api/Appapi/Model/User.php
+3
-2
api/Common/functions.php
+15
-43
api/Config/app.php
+5
-5
api/Library/Qiniu/Lite.php
+0
-1
api/Library/Qiniu/qiniu/conf.php
+2
-1
application/Admin/Controller/ChargeController.class.php
+89
-0
application/Appapi/Controller/AuthController.class.php
+35
-1
application/Common/Common/function.php
+53
-34
public/appapi/css/style_hl.css
+3
-2
sdk/ChuanglanSmsApi.php
+130
-0
No files found.
admin/themes/simplebootx/Admin/Configprivate/index.html
View file @
95915784
...
@@ -76,7 +76,24 @@ input{
...
@@ -76,7 +76,24 @@ input{
<label
class=
"checkbox inline"
>
家族是否开启
</label>
<label
class=
"checkbox inline"
>
家族是否开启
</label>
</div>
</div>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
接收短信手机号
</label>
<div
class=
"controls"
>
<input
type=
"text"
name=
"post[yy_mobile]"
value=
"{$config['yy_mobile']}"
>
运营人员接收认证主播提交资料短信提示
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
接收短信手机号
</label>
<div
class=
"controls"
>
<input
type=
"text"
name=
"post[yy_mobile2]"
value=
"{$config['yy_mobile2']}"
>
运营人员接收认证主播提交资料短信提示
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
接收短信手机号
</label>
<div
class=
"controls"
>
<input
type=
"text"
name=
"post[yy_mobile3]"
value=
"{$config['yy_mobile2\3']}"
>
运营人员接收认证主播提交资料短信提示
</div>
</div>
...
...
admin/themes/simplebootx/Admin/Userauth/edit3.html
View file @
95915784
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
</fieldset>
</fieldset>
<div
class=
"form-actions"
>
<div
class=
"form-actions"
>
<button
type=
"submit"
class=
"btn btn-primary js-ajax-submit"
>
{:L('EDIT')}
</button>
<button
type=
"submit"
class=
"btn btn-primary js-ajax-submit"
>
确认
</button>
<a
class=
"btn"
href=
"{:U('Userauth/index3')}"
>
{:L('BACK')}
</a>
<a
class=
"btn"
href=
"{:U('Userauth/index3')}"
>
{:L('BACK')}
</a>
</div>
</div>
</form>
</form>
...
...
api/Appapi/Api/Charge.php
View file @
95915784
...
@@ -322,7 +322,7 @@ class Api_Charge extends PhalApi_Api {
...
@@ -322,7 +322,7 @@ class Api_Charge extends PhalApi_Api {
'status'
=>
0
,
'status'
=>
0
,
'addtime'
=>
time
(),
'addtime'
=>
time
(),
'change_id'
=>
$changeid
,
'change_id'
=>
$changeid
,
'is_sure'
=>
$touid
?
0
:
1
,
'is_sure'
=>
1
,
//
$touid ? 0 : 1,
]);
]);
if
(
$info
==
1003
){
if
(
$info
==
1003
){
...
...
api/Appapi/Api/Live.php
View file @
95915784
...
@@ -1519,13 +1519,13 @@ class Api_Live extends PhalApi_Api {
...
@@ -1519,13 +1519,13 @@ class Api_Live extends PhalApi_Api {
$giftlist
=
$domain
->
getGiftList
();
$giftlist
=
$domain
->
getGiftList
();
setcaches
(
$key
,
$giftlist
);
setcaches
(
$key
,
$giftlist
);
}
}
$data
=
[];
//
$data = [];
foreach
(
$giftlist
as
$key
=>
$item
)
{
//
foreach ($giftlist as $key => $item) {
if
(
$item
[
'type'
]
==
$this
->
type
)
{
//
if ($item['type'] == $this->type) {
$data
[]
=
$item
;
//
$data[] = $item;
}
//
}
}
//
}
$giftlist
=
$data
;
//
$giftlist = $data;
$domain2
=
new
Domain_User
();
$domain2
=
new
Domain_User
();
$coin
=
$domain2
->
getBalance
(
$uid
);
$coin
=
$domain2
->
getBalance
(
$uid
);
...
...
api/Appapi/Api/User.php
View file @
95915784
...
@@ -283,6 +283,21 @@ class Api_User extends PhalApi_Api
...
@@ -283,6 +283,21 @@ class Api_User extends PhalApi_Api
'token'
=>
[
'name'
=>
'token'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'用户token'
],
'token'
=>
[
'name'
=>
'token'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'用户token'
],
'alipay_pay'
=>
[
'name'
=>
'alipay_pay'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'支付宝收款图片'
],
'alipay_pay'
=>
[
'name'
=>
'alipay_pay'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'支付宝收款图片'
],
'wx_pay'
=>
[
'name'
=>
'wx_pay'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'微信收款图片'
],
'wx_pay'
=>
[
'name'
=>
'wx_pay'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'微信收款图片'
],
'user_pass'
=>
[
'name'
=>
'user_pass'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'密码'
],
],
'getCode'
=>
[
'uid'
=>
[
'name'
=>
'uid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'用户ID'
],
'mobile'
=>
[
'name'
=>
'mobile'
,
'type'
=>
'string'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'手机号'
],
'sign'
=>
[
'name'
=>
'sign'
,
'type'
=>
'string'
,
'default'
=>
''
,
'desc'
=>
'签名'
],
],
'setPass'
=>
[
'uid'
=>
[
'name'
=>
'uid'
,
'type'
=>
'int'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'用户ID'
],
'token'
=>
[
'name'
=>
'token'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'用户token'
],
'code'
=>
[
'name'
=>
'code'
,
'type'
=>
'string'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'验证码'
],
'user_pass'
=>
[
'name'
=>
'user_pass'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'密码'
],
'mobile'
=>
[
'name'
=>
'mobile'
,
'type'
=>
'string'
,
'min'
=>
1
,
'require'
=>
true
,
'desc'
=>
'手机号'
],
],
],
];
];
...
@@ -2244,6 +2259,7 @@ class Api_User extends PhalApi_Api
...
@@ -2244,6 +2259,7 @@ class Api_User extends PhalApi_Api
$rs
=
[
'code'
=>
0
,
'info'
=>
[],
'msg'
=>
'提交成功'
];
$rs
=
[
'code'
=>
0
,
'info'
=>
[],
'msg'
=>
'提交成功'
];
$uid
=
checkNull
(
$this
->
uid
);
$uid
=
checkNull
(
$this
->
uid
);
$token
=
checkNull
(
$this
->
token
);
$token
=
checkNull
(
$this
->
token
);
$user_pass
=
checkNull
(
$this
->
user_pass
);
$checkToken
=
checkToken
(
$uid
,
$token
);
$checkToken
=
checkToken
(
$uid
,
$token
);
if
(
$checkToken
==
700
)
{
if
(
$checkToken
==
700
)
{
...
@@ -2251,6 +2267,13 @@ class Api_User extends PhalApi_Api
...
@@ -2251,6 +2267,13 @@ class Api_User extends PhalApi_Api
$rs
[
'msg'
]
=
'您的登陆状态失效,请重新登陆!'
;
$rs
[
'msg'
]
=
'您的登陆状态失效,请重新登陆!'
;
return
$rs
;
return
$rs
;
}
}
$user
=
DI
()
->
notorm
->
users
->
where
(
"id=
{
$uid
}
"
)
->
fetchOne
();
if
(
$user
[
'user_pass2'
]
!=
setPass
(
$user_pass
))
{
$rs
[
'code'
]
=
10001
;
$rs
[
'msg'
]
=
'密码错误'
;
return
$rs
;
}
$data
=
$this
->
_getPayImage
(
$uid
);
$data
=
$this
->
_getPayImage
(
$uid
);
if
(
!
$data
)
{
if
(
!
$data
)
{
DI
()
->
notorm
->
users_auth_pay
->
insert
([
DI
()
->
notorm
->
users_auth_pay
->
insert
([
...
@@ -2273,4 +2296,140 @@ class Api_User extends PhalApi_Api
...
@@ -2273,4 +2296,140 @@ class Api_User extends PhalApi_Api
return
$rs
;
return
$rs
;
}
}
public
function
getCode
()
{
$rs
=
[
'code'
=>
0
,
'msg'
=>
''
,
'info'
=>
[]];
$mobile
=
checkNull
(
$this
->
mobile
);
$sign
=
checkNull
(
$this
->
sign
);
$uid
=
checkNull
(
$this
->
uid
);
$ismobile
=
checkMobile
(
$mobile
);
if
(
!
$ismobile
)
{
$rs
[
'code'
]
=
1001
;
$rs
[
'msg'
]
=
'请输入正确的手机号'
;
return
$rs
;
}
$checkdata
=
[
'mobile'
=>
$mobile
,
];
$issign
=
checkSign
(
$checkdata
,
$sign
);
if
(
!
$issign
)
{
$rs
[
'code'
]
=
1001
;
$rs
[
'msg'
]
=
'签名错误'
;
return
$rs
;
}
if
(
$_SESSION
[
'user_pass2_mobile'
]
==
$mobile
&&
$_SESSION
[
'user_pass2_mobile_expiretime'
]
>
time
())
{
$rs
[
'code'
]
=
1002
;
$rs
[
'msg'
]
=
'验证码5分钟有效,请勿多次发送'
;
return
$rs
;
}
$limit
=
ip_limit
();
if
(
$limit
==
1
)
{
$rs
[
'code'
]
=
1003
;
$rs
[
'msg'
]
=
'您已当日发送次数过多'
;
return
$rs
;
}
$user
=
DI
()
->
notorm
->
users
->
where
(
"id=
{
$uid
}
"
)
->
fetchOne
();
if
(
!
empty
(
$user
[
'user_pass2'
])
&&
$user
[
'user_pass_mobile'
]
!=
$mobile
)
{
$rs
[
'code'
]
=
1004
;
$rs
[
'msg'
]
=
'输入号码不一致'
;
return
$rs
;
}
$mobile_code
=
random
(
6
,
1
);
/* 发送验证码 */
$result
=
sendCode
(
$mobile
,
$mobile_code
);
if
(
$result
[
'code'
]
==
0
)
{
$_SESSION
[
'user_pass2_mobile'
]
=
$mobile
;
$_SESSION
[
'user_pass2_mobile_code'
]
=
$mobile_code
;
$_SESSION
[
'user_pass2_mobile_expiretime'
]
=
time
()
+
60
*
5
;
}
else
{
if
(
$result
[
'code'
]
==
667
)
{
$_SESSION
[
'user_pass2_mobile'
]
=
$mobile
;
$_SESSION
[
'user_pass2_mobile_code'
]
=
$result
[
'msg'
];
$_SESSION
[
'user_pass2_mobile_expiretime'
]
=
time
()
+
60
*
5
;
$rs
[
'code'
]
=
1002
;
$rs
[
'msg'
]
=
'验证码为:'
.
$result
[
'msg'
];
}
else
{
$rs
[
'code'
]
=
1002
;
$rs
[
'msg'
]
=
$result
[
'msg'
];
}
}
return
$rs
;
}
public
function
setPass
()
{
$rs
=
[
'code'
=>
0
,
'info'
=>
[],
'msg'
=>
'提交成功'
];
$uid
=
checkNull
(
$this
->
uid
);
$token
=
checkNull
(
$this
->
token
);
$user_pass
=
checkNull
(
$this
->
user_pass
);
$mobile
=
checkNull
(
$this
->
mobile
);
$code
=
checkNull
(
$this
->
code
);
$checkToken
=
checkToken
(
$uid
,
$token
);
if
(
$checkToken
==
700
)
{
$rs
[
'code'
]
=
$checkToken
;
$rs
[
'msg'
]
=
'您的登陆状态失效,请重新登陆!'
;
return
$rs
;
}
if
(
!
$_SESSION
[
'user_pass2_mobile'
]
||
!
$_SESSION
[
'user_pass2_mobile_code'
])
{
$rs
[
'code'
]
=
1001
;
$rs
[
'msg'
]
=
'请先获取验证码'
;
return
$rs
;
}
if
(
$mobile
!=
$_SESSION
[
'user_pass2_mobile'
])
{
$rs
[
'code'
]
=
1001
;
$rs
[
'msg'
]
=
'手机号码不一致'
;
return
$rs
;
}
if
(
$code
!=
$_SESSION
[
'user_pass2_mobile_code'
])
{
$rs
[
'code'
]
=
1002
;
$rs
[
'msg'
]
=
'验证码错误'
;
return
$rs
;
}
// $check = passcheck($user_pass);
//
// if($check==0){
// $rs['code'] = 1004;
// $rs['msg'] = '密码6-12位数字与字母';
// return $rs;
// }else if($check==2){
// $rs['code'] = 1005;
// $rs['msg'] = '密码不能纯数字或纯字母';
// return $rs;
// }
$user
=
DI
()
->
notorm
->
users
->
where
(
"id=
{
$uid
}
"
)
->
fetchOne
();
$update
=
[
'user_pass2'
=>
setPass
(
$user_pass
),
];
if
(
empty
(
$user
[
'user_pass2'
]))
{
$update
[
'user_pass_mobile'
]
=
$mobile
;
}
DI
()
->
notorm
->
users
->
where
(
"id=
{
$uid
}
"
)
->
update
(
$update
);
$_SESSION
[
'user_pass2_mobile'
]
=
''
;
$_SESSION
[
'user_pass2_mobile_code'
]
=
''
;
$_SESSION
[
'user_pass2_mobile_expiretime'
]
=
''
;
return
$rs
;
}
}
}
api/Appapi/Model/Home.php
View file @
95915784
...
@@ -42,7 +42,7 @@ class Model_Home extends PhalApi_Model_NotORM {
...
@@ -42,7 +42,7 @@ class Model_Home extends PhalApi_Model_NotORM {
$result
=
DI
()
->
notorm
->
users_live
$result
=
DI
()
->
notorm
->
users_live
->
select
(
"uid,title,city,stream,pull,thumb,isvideo,type,type_val,game_action,goodnum,anyway"
)
->
select
(
"uid,title,city,stream,pull,thumb,isvideo,type,type_val,game_action,goodnum,anyway"
)
->
where
(
$where
)
->
where
(
$where
)
->
order
(
'isrecommend desc,hotvotes desc,starttime desc'
)
//
->order('isrecommend desc,hotvotes desc,starttime desc')
->
order
(
"RAND()"
)
->
order
(
"RAND()"
)
->
limit
(
50
)
->
limit
(
50
)
->
fetchAll
();
->
fetchAll
();
...
...
api/Appapi/Model/User.php
View file @
95915784
...
@@ -4,7 +4,7 @@ class Model_User extends PhalApi_Model_NotORM {
...
@@ -4,7 +4,7 @@ class Model_User extends PhalApi_Model_NotORM {
/* 用户全部信息 */
/* 用户全部信息 */
public
function
getBaseInfo
(
$uid
)
{
public
function
getBaseInfo
(
$uid
)
{
$info
=
DI
()
->
notorm
->
users
$info
=
DI
()
->
notorm
->
users
->
select
(
"id,mobile, user_nicename,avatar,avatar_thumb,sex,signature,coin,votes,consumption,votestotal,province,city,birthday,alipay_pay,wx_pay"
)
->
select
(
"id,mobile,
user_pass2,
user_nicename,avatar,avatar_thumb,sex,signature,coin,votes,consumption,votestotal,province,city,birthday,alipay_pay,wx_pay"
)
->
where
(
'id=? and user_type="2"'
,
$uid
)
->
where
(
'id=? and user_type="2"'
,
$uid
)
->
fetchOne
();
->
fetchOne
();
if
(
$info
){
if
(
$info
){
...
@@ -15,7 +15,8 @@ class Model_User extends PhalApi_Model_NotORM {
...
@@ -15,7 +15,8 @@ class Model_User extends PhalApi_Model_NotORM {
$info
[
'lives'
]
=
getLives
(
$uid
);
$info
[
'lives'
]
=
getLives
(
$uid
);
$info
[
'follows'
]
=
getFollows
(
$uid
);
$info
[
'follows'
]
=
getFollows
(
$uid
);
$info
[
'fans'
]
=
getFans
(
$uid
);
$info
[
'fans'
]
=
getFans
(
$uid
);
$info
[
'isTwoPass'
]
=
!
empty
(
$info
[
'user_pass2'
])
?
1
:
0
;
unset
(
$info
[
'user_pass2'
]);
$info
[
'vip'
]
=
getUserVip
(
$uid
);
$info
[
'vip'
]
=
getUserVip
(
$uid
);
$info
[
'liang'
]
=
getUserLiang
(
$uid
);
$info
[
'liang'
]
=
getUserLiang
(
$uid
);
...
...
api/Common/functions.php
View file @
95915784
...
@@ -195,57 +195,29 @@
...
@@ -195,57 +195,29 @@
return
$rs
;
return
$rs
;
}
}
require_once
API_ROOT
.
'/../sdk/ronglianyun/CCPRestSDK.php'
;
require_once
API_ROOT
.
'/../sdk/ChuanglanSmsApi.php'
;
$clapi
=
new
ChuanglanSmsApi
();
//主帐号
$msg
=
'【海狮live】您的验证码为{$var},请您尽快填写!'
;
$accountSid
=
$config
[
'ccp_sid'
];
$params
=
$mobile
.
','
.
$code
;
//主帐号Token
$result
=
$clapi
->
sendVariableSMS
(
$msg
,
$params
);
$accountToken
=
$config
[
'ccp_token'
];
//应用Id
if
(
!
is_null
(
json_decode
(
$result
))){
$appId
=
$config
[
'ccp_appid'
];
$output
=
json_decode
(
$result
,
true
);
//请求地址,格式如下,不需要写https://
if
(
isset
(
$output
[
'code'
])
&&
$output
[
'code'
]
==
'0'
){
$serverIP
=
'app.cloopen.com'
;
$content
=
$code
;
//请求端口
setSendcode
(
array
(
'type'
=>
'1'
,
'account'
=>
$mobile
,
'content'
=>
$content
));
$serverPort
=
'8883'
;
return
$rs
;
//REST版本号
}
else
{
$softVersion
=
'2013-12-26'
;
$tempId
=
$config
[
'ccp_tempid'
];
// $tempIds=explode('|', $config['ccp_tempid']);
// $tempId = $tempIds[$index];
file_put_contents
(
API_ROOT
.
'/../data/sendCode_ccp_'
.
date
(
'Y-m-d'
)
.
'.txt'
,
date
(
'Y-m-d H:i:s'
)
.
' 提交参数信息 post_data: accountSid:'
.
$accountSid
.
";accountToken:
{
$accountToken
}
;appId:
{
$appId
}
;tempId:
{
$tempId
}
\r\n
"
,
FILE_APPEND
);
$rest
=
new
REST
(
$serverIP
,
$serverPort
,
$softVersion
);
$rest
->
setAccount
(
$accountSid
,
$accountToken
);
$rest
->
setAppId
(
$appId
);
$datas
=
[];
$datas
[]
=
$code
;
$result
=
$rest
->
sendTemplateSMS
(
$mobile
,
$datas
,
$tempId
);
file_put_contents
(
API_ROOT
.
'/../data/sendCode_ccp_'
.
date
(
'Y-m-d'
)
.
'.txt'
,
date
(
'Y-m-d H:i:s'
)
.
' 提交参数信息 result:'
.
json_encode
(
$result
)
.
"
\r\n
"
,
FILE_APPEND
);
if
(
$result
==
NULL
)
{
$rs
[
'code'
]
=
1002
;
$rs
[
'code'
]
=
1002
;
//$rs['msg']=$gets['SubmitResult']['msg'];
$rs
[
'msg'
]
=
"获取失败"
;
$rs
[
'msg'
]
=
"获取失败"
;
return
$rs
;
return
$rs
;
}
}
if
(
$result
->
statusCode
!=
0
)
{
}
else
{
//echo "error code :" . $result->statusCode . "<br>";
//echo "error msg :" . $result->statusMsg . "<br>";
//TODO 添加错误处理逻辑
$rs
[
'code'
]
=
1002
;
$rs
[
'code'
]
=
1002
;
//$rs['msg']=$gets['SubmitResult']['msg'];
$rs
[
'msg'
]
=
"获取失败"
;
$rs
[
'msg'
]
=
"获取失败"
;
return
$rs
;
return
$rs
;
}
}
$content
=
$code
;
setSendcode
(
array
(
'type'
=>
'1'
,
'account'
=>
$mobile
,
'content'
=>
$content
));
return
$rs
;
}
}
/* curl get请求 */
/* curl get请求 */
...
...
api/Config/app.php
View file @
95915784
...
@@ -17,17 +17,17 @@ return array(
...
@@ -17,17 +17,17 @@ return array(
'sign_key'
=>
'76576076c1f5f657b634e966c8836a06'
,
'sign_key'
=>
'76576076c1f5f657b634e966c8836a06'
,
'uptype'
=>
2
,
//上传方式�?表示 七牛�?表示 本地
'uptype'
=>
1
,
//上传方式�?表示 七牛�?表示 本地
/**
/**
* 七牛相关配置
* 七牛相关配置
*/
*/
'Qiniu'
=>
array
(
'Qiniu'
=>
array
(
//统一的key
//统一的key
'accessKey'
=>
'
guBt53WaJGrP5kLLhSL-th6pS-99IiPJsBM_YdCX
'
,
'accessKey'
=>
'
LV3kf-D2OZLrzR2BaDuW37pLLUKt1HB7TTDKgISy
'
,
'secretKey'
=>
'
35VrPLcM5dszyQqxVkIygulVdLBUFDjRd_W3vlnS
'
,
'secretKey'
=>
'
ajVeUFdoxvRkqQari4GBUbRCdXIT6VKWGuPl4Dqd
'
,
//自定义配置的空间
//自定义配置的空间
'space_bucket'
=>
'
mengyas
'
,
'space_bucket'
=>
'
haishi1
'
,
'space_host'
=>
'
qny.mengyazhibo
.com'
,
'space_host'
=>
'
http://qny.seals-live
.com'
,
),
),
/**
/**
...
...
api/Library/Qiniu/Lite.php
View file @
95915784
...
@@ -60,7 +60,6 @@ class Qiniu_Lite {
...
@@ -60,7 +60,6 @@ class Qiniu_Lite {
$fileUrl
=
$config
[
'space_host'
]
.
'/'
.
$fileName
;
$fileUrl
=
$config
[
'space_host'
]
.
'/'
.
$fileName
;
DI
()
->
logger
->
debug
(
'succeed to upload file to qiniu'
,
$ret
);
DI
()
->
logger
->
debug
(
'succeed to upload file to qiniu'
,
$ret
);
}
}
return
$fileUrl
;
return
$fileUrl
;
}
}
...
...
api/Library/Qiniu/qiniu/conf.php
View file @
95915784
...
@@ -10,7 +10,8 @@ global $QINIU_SECRET_KEY;
...
@@ -10,7 +10,8 @@ global $QINIU_SECRET_KEY;
$SDK_VER
=
"6.1.9"
;
$SDK_VER
=
"6.1.9"
;
$QINIU_UP_HOST
=
'http://upload.qiniup.com'
;
//$QINIU_UP_HOST = 'http://upload.qiniup.com';
$QINIU_UP_HOST
=
'http://up-z2.qiniup.com'
;
$QINIU_RS_HOST
=
'http://rs.qbox.me'
;
$QINIU_RS_HOST
=
'http://rs.qbox.me'
;
$QINIU_RSF_HOST
=
'http://rsf.qbox.me'
;
$QINIU_RSF_HOST
=
'http://rsf.qbox.me'
;
...
...
application/Admin/Controller/ChargeController.class.php
View file @
95915784
...
@@ -194,6 +194,95 @@ class ChargeController extends AdminbaseController {
...
@@ -194,6 +194,95 @@ class ChargeController extends AdminbaseController {
function
index
(){
function
index
(){
$adminid
=
$_SESSION
[
'ADMIN_ID'
];
$role_id
=
$_SESSION
[
'role_id'
];
$Proxy
=
M
(
'users_proxy'
);
$showlevel
=
'0'
;
if
(
$role_id
==
6
){
//一级代理
$showlevel
=
'1'
;
$where
[
'u.user_type'
]
=
'1'
;
$where
[
'r.role_id'
]
=
'7'
;
$path
=
setpath
(
$adminid
);
$uids
=
$Proxy
->
where
(
"type=-1 and path like '%
{
$path
}
%'"
)
->
getField
(
'uid'
,
true
);
if
(
!
$uids
){
$uids
=
[];
array_push
(
$uids
,
'0'
);
}
$where
[
'u.id'
]
=
array
(
'in'
,
$uids
);
$promoterlist
=
M
(
'users u'
)
->
join
(
'__ROLE_USER__ r ON r.user_id = u.id'
)
->
field
(
'u.id,u.user_login,user_nicename'
)
->
where
(
$where
)
->
order
(
"u.create_time DESC"
)
->
select
();
foreach
(
$promoterlist
as
$k
=>
$v
){
if
(
$v
[
'user_nicename'
]
==
''
){
$v
[
'user_nicename'
]
=
$v
[
'user_login'
];
}
$promoterlist
[
$k
]
=
$v
;
}
}
else
if
(
$role_id
==
7
){
$showlevel
=
'2'
;
}
else
{
$where
[
'u.user_type'
]
=
'1'
;
$where
[
'r.role_id'
]
=
'6'
;
$proxylistj
=
[];
$proxylist
=
M
(
'users u'
)
->
join
(
'__ROLE_USER__ r ON r.user_id = u.id'
)
->
field
(
'u.id,u.user_login,u.user_nicename'
)
->
where
(
$where
)
->
order
(
"u.create_time DESC"
)
->
select
();
foreach
(
$proxylist
as
$k
=>
$v
){
if
(
$v
[
'user_nicename'
]
==
''
){
$v
[
'user_nicename'
]
=
$v
[
'user_login'
];
}
$where2
[
'user_type'
]
=
'1'
;
$path
=
setpath
(
$v
[
'id'
]);
$uids
=
$Proxy
->
where
(
"type=-1 and path like '%
{
$path
}
%'"
)
->
getField
(
'uid'
,
true
);
if
(
!
$uids
){
$uids
=
[];
array_push
(
$uids
,
'0'
);
}
$where2
[
'id'
]
=
array
(
'in'
,
$uids
);
$promoterlistj
=
[];
$promoterlist2
=
M
(
'users'
)
->
field
(
'id,user_login,user_nicename'
)
->
where
(
$where2
)
->
order
(
"create_time DESC"
)
->
select
();
foreach
(
$promoterlist2
as
$k2
=>
$v2
){
if
(
$v2
[
'user_nicename'
]
==
''
){
$v2
[
'user_nicename'
]
=
$v2
[
'user_login'
];
}
$promoterlistj
[
$v2
[
'id'
]]
=
$v2
;
}
$v
[
'list'
]
=
$promoterlistj
;
$proxylistj
[
$v
[
'id'
]]
=
$v
;
}
}
if
(
$role_id
==
6
||
$role_id
==
7
||
$role_id
==
8
||
$role_id
==
9
||
$_REQUEST
[
'proxyid'
]
!=
''
||
$_REQUEST
[
'promoterid'
]
!=
''
){
if
(
$_REQUEST
[
'proxyid'
]
!=
''
){
$adminid
=
$_REQUEST
[
'proxyid'
];
$_GET
[
'proxyid'
]
=
$_REQUEST
[
'proxyid'
];
}
if
(
$_REQUEST
[
'promoterid'
]
!=
''
){
$adminid
=
$_REQUEST
[
'promoterid'
];
$_GET
[
'promoterid'
]
=
$_REQUEST
[
'promoterid'
];
}
$path
=
setpath
(
$adminid
);
$uids
=
$Proxy
->
where
(
"path like '%
{
$path
}
%'"
)
->
getField
(
'uid'
,
true
);
if
(
!
$uids
){
$uids
=
[];
array_push
(
$uids
,
'0'
);
}
$map
[
'touid'
]
=
array
(
'in'
,
$uids
);
}
if
(
$_REQUEST
[
'status'
]
!=
''
){
if
(
$_REQUEST
[
'status'
]
!=
''
){
$map
[
'status'
]
=
$_REQUEST
[
'status'
];
$map
[
'status'
]
=
$_REQUEST
[
'status'
];
$_GET
[
'status'
]
=
$_REQUEST
[
'status'
];
$_GET
[
'status'
]
=
$_REQUEST
[
'status'
];
...
...
application/Appapi/Controller/AuthController.class.php
View file @
95915784
...
@@ -7,6 +7,7 @@ use Common\Controller\HomebaseController;
...
@@ -7,6 +7,7 @@ use Common\Controller\HomebaseController;
class
AuthController
extends
HomebaseController
{
class
AuthController
extends
HomebaseController
{
public
function
index
(){
public
function
index
(){
var_dump
(
sendTip
());
$uid
=
I
(
"uid"
);
$uid
=
I
(
"uid"
);
$token
=
I
(
"token"
);
$token
=
I
(
"token"
);
if
(
!
$uid
||
!
$token
||
checkToken
(
$uid
,
$token
)
==
700
){
if
(
!
$uid
||
!
$token
||
checkToken
(
$uid
,
$token
)
==
700
){
...
@@ -93,6 +94,30 @@ class AuthController extends HomebaseController {
...
@@ -93,6 +94,30 @@ class AuthController extends HomebaseController {
$this
->
display
();
$this
->
display
();
}
}
protected
function
auth3
(
$params
)
{
$url
=
'https://api.253.com/open/carriers/carriers-auth'
;
// $url = 'https://api.253.com/open/carriers/carriers-auth-detail';
$params
=
[
'appId'
=>
'pPGkFovq'
,
// appId,登录万数平台查看
'appKey'
=>
'YLur3BYi'
,
// appKey,登录万数平台查看
'name'
=>
$params
[
'real_name'
],
// 姓名
'idNum'
=>
$params
[
'cer_no'
],
// 身份证号
'mobile'
=>
$params
[
'mobile'
],
// 手机号
];
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
0
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_POST
,
1
);
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
http_build_query
(
$params
));
curl_setopt
(
$ch
,
CURLOPT_TIMEOUT
,
5
);
$result
=
curl_exec
(
$ch
);
return
json_decode
(
$result
,
true
);
}
/* 认证保存 */
/* 认证保存 */
public
function
authsave
(){
public
function
authsave
(){
...
@@ -104,7 +129,6 @@ class AuthController extends HomebaseController {
...
@@ -104,7 +129,6 @@ class AuthController extends HomebaseController {
exit
;
exit
;
}
}
$data
[
'uid'
]
=
I
(
"uid"
);
$data
[
'uid'
]
=
I
(
"uid"
);
$data
[
'real_name'
]
=
I
(
"real_name"
);
$data
[
'real_name'
]
=
I
(
"real_name"
);
$data
[
'mobile'
]
=
I
(
"mobile"
);
$data
[
'mobile'
]
=
I
(
"mobile"
);
...
@@ -114,6 +138,14 @@ class AuthController extends HomebaseController {
...
@@ -114,6 +138,14 @@ class AuthController extends HomebaseController {
$data
[
'handset_view'
]
=
I
(
"handset_view"
);
$data
[
'handset_view'
]
=
I
(
"handset_view"
);
$data
[
'status'
]
=
0
;
$data
[
'status'
]
=
0
;
$data
[
'addtime'
]
=
time
();
$data
[
'addtime'
]
=
time
();
$check
=
$this
->
auth3
(
$data
);
if
(
!
$check
[
'chargeStatus'
]
||
$check
[
'data'
][
'result'
]
!==
'01'
)
{
echo
json_encode
(
array
(
"ret"
=>
0
,
'data'
=>
array
(),
'msg'
=>
'信息填写错误'
));
exit
;
}
$authid
=
M
(
"users_auth"
)
->
where
(
"uid='
{
$data
[
'uid'
]
}
'"
)
->
getField
(
"uid"
);
$authid
=
M
(
"users_auth"
)
->
where
(
"uid='
{
$data
[
'uid'
]
}
'"
)
->
getField
(
"uid"
);
if
(
$authid
){
if
(
$authid
){
$result
=
M
(
"users_auth"
)
->
where
(
"uid='
{
$authid
}
'"
)
->
save
(
$data
);
$result
=
M
(
"users_auth"
)
->
where
(
"uid='
{
$authid
}
'"
)
->
save
(
$data
);
...
@@ -121,6 +153,8 @@ class AuthController extends HomebaseController {
...
@@ -121,6 +153,8 @@ class AuthController extends HomebaseController {
$result
=
M
(
"users_auth"
)
->
add
(
$data
);
$result
=
M
(
"users_auth"
)
->
add
(
$data
);
}
}
sendTip
();
if
(
$result
!==
false
){
if
(
$result
!==
false
){
echo
json_encode
(
array
(
"ret"
=>
200
,
'data'
=>
array
(),
'msg'
=>
''
));
echo
json_encode
(
array
(
"ret"
=>
200
,
'data'
=>
array
(),
'msg'
=>
''
));
}
else
{
}
else
{
...
...
application/Common/Common/function.php
View file @
95915784
...
@@ -2436,53 +2436,72 @@ function sp_delete_physics_img($imglist){
...
@@ -2436,53 +2436,72 @@ function sp_delete_physics_img($imglist){
return
$rs
;
return
$rs
;
}
}
require_once
SITE_PATH
.
'sdk/ronglianyun/CCPRestSDK.php'
;
require_once
API_ROOT
.
'/../sdk/ChuanglanSmsApi.php'
;
$clapi
=
new
ChuanglanSmsApi
();
//主帐号
$msg
=
'【海狮live】您的验证码为{$var},请您尽快填写!'
;
$accountSid
=
$config
[
'ccp_sid'
];
$params
=
$mobile
.
','
.
$code
;
//主帐号Token
$result
=
$clapi
->
sendVariableSMS
(
$msg
,
$params
);
$accountToken
=
$config
[
'ccp_token'
];
//应用Id
if
(
!
is_null
(
json_decode
(
$result
))){
$appId
=
$config
[
'ccp_appid'
];
$output
=
json_decode
(
$result
,
true
);
//请求地址,格式如下,不需要写https://
if
(
isset
(
$output
[
'code'
])
&&
$output
[
'code'
]
==
'0'
){
$serverIP
=
'app.cloopen.com'
;
$content
=
$code
;
//请求端口
setSendcode
(
array
(
'type'
=>
'1'
,
'account'
=>
$mobile
,
'content'
=>
$content
));
$serverPort
=
'8883'
;
return
$rs
;
//REST版本号
}
else
{
$softVersion
=
'2013-12-26'
;
$rs
[
'code'
]
=
1002
;
//$rs['msg']=$gets['SubmitResult']['msg'];
$tempId
=
$config
[
'ccp_tempid'
];
$rs
[
'msg'
]
=
"获取失败"
;
return
$rs
;
}
}
else
{
$rs
[
'code'
]
=
1002
;
$rs
[
'msg'
]
=
"获取失败"
;
return
$rs
;
}
}
file_put_contents
(
SITE_PATH
.
'data/sendCode_ccp_'
.
date
(
'Y-m-d'
)
.
'.txt'
,
date
(
'Y-m-d H:i:s'
)
.
' 提交参数信息 post_data: accountSid:'
.
$accountSid
.
";accountToken:
{
$accountToken
}
;appId:
{
$appId
}
;tempId:
{
$tempId
}
\r\n
"
,
FILE_APPEND
);
function
sendTip
(){
$rest
=
new
\REST
(
$serverIP
,
$serverPort
,
$softVersion
);
$rs
=
array
(
'code'
=>
0
,
'msg'
=>
''
,
'info'
=>
array
());
$rest
->
setAccount
(
$accountSid
,
$accountToken
);
$rest
->
setAppId
(
$appId
);
$datas
=
[];
$configpri
=
getConfigPri
();
$datas
[]
=
$code
;
$mobile
=
[];
if
(
!
empty
(
$configpri
[
'yy_mobile'
]))
{
$mobile
[]
=
$configpri
[
'yy_mobile'
];
}
if
(
!
empty
(
$configpri
[
'yy_mobile2'
]))
{
$mobile
[]
=
$configpri
[
'yy_mobile2'
];
}
if
(
!
empty
(
$configpri
[
'yy_mobile3'
]))
{
$mobile
[]
=
$configpri
[
'yy_mobile3'
];
}
$m
=
implode
(
','
,
$mobile
);
$result
=
$rest
->
sendTemplateSMS
(
$mobile
,
$datas
,
$tempId
);
require_once
API_ROOT
.
'/../sdk/ChuanglanSmsApi.php'
;
file_put_contents
(
SITE_PATH
.
'data/sendCode_ccp_'
.
date
(
'Y-m-d'
)
.
'.txt'
,
date
(
'Y-m-d H:i:s'
)
.
' 提交参数信息 result:'
.
json_encode
(
$result
)
.
"
\r\n
"
,
FILE_APPEND
);
$clapi
=
new
ChuanglanSmsApi
();
// $msg = '【海狮live】有新的主播申请认证,请您尽快登录后台进行审核!';
$msg
=
'【海狮live】您的验证码为test,请您尽快填写!'
;
$result
=
$clapi
->
sendSMS
(
$m
,
$msg
);
// $result = $clapi->sendVariableSMS($msg, $params);
if
(
$result
==
NULL
)
{
if
(
!
is_null
(
json_decode
(
$result
))){
$output
=
json_decode
(
$result
,
true
);
var_dump
(
$output
);
die
;
if
(
isset
(
$output
[
'code'
])
&&
$output
[
'code'
]
==
'0'
){
return
$rs
;
}
else
{
$rs
[
'code'
]
=
1002
;
$rs
[
'code'
]
=
1002
;
//$rs['msg']=$gets['SubmitResult']['msg'];
$rs
[
'msg'
]
=
"获取失败"
;
$rs
[
'msg'
]
=
"获取失败"
;
return
$rs
;
return
$rs
;
}
}
if
(
$result
->
statusCode
!=
0
)
{
}
else
{
//echo "error code :" . $result->statusCode . "<br>";
//echo "error msg :" . $result->statusMsg . "<br>";
//TODO 添加错误处理逻辑
$rs
[
'code'
]
=
1002
;
$rs
[
'code'
]
=
1002
;
//$rs['msg']=$gets['SubmitResult']['msg'];
$rs
[
'msg'
]
=
"获取失败"
;
$rs
[
'msg'
]
=
"获取失败"
;
return
$rs
;
return
$rs
;
}
}
$content
=
$code
;
setSendcode
(
array
(
'type'
=>
'1'
,
'account'
=>
$mobile
,
'content'
=>
$content
));
return
$rs
;
}
}
/**导出Excel 表格
/**导出Excel 表格
...
...
public/appapi/css/style_hl.css
View file @
95915784
...
@@ -49,8 +49,9 @@
...
@@ -49,8 +49,9 @@
.vip
.downBox
{
padding
:
.75rem
;
width
:
100%
;
}
.vip
.downBox
{
padding
:
.75rem
;
width
:
100%
;
}
.vip
.buyknow
{
width
:
100%
;
font-size
:
.7rem
;
color
:
#333
;
font-weight
:
600
;
}
.vip
.buyknow
{
width
:
100%
;
font-size
:
.7rem
;
color
:
#333
;
font-weight
:
600
;
}
.vip
.knowList
{
margin-top
:
.25rem
;
font-size
:
.6rem
;
color
:
#999
;
line-height
:
.85rem
;
}
.vip
.knowList
{
margin-top
:
.25rem
;
font-size
:
.6rem
;
color
:
#999
;
line-height
:
.85rem
;
}
.vip
.footBox
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
width
:
100%
;
height
:
2.5rem
;
border-top
:
.05rem
solid
#f2f2f2
;
display
:
flex
;
align-items
:
center
;
padding
:
0
.75rem
;
justify-content
:
center
;
flex-direction
:
row-reverse
;
}
/* .vip .footBox { position: fixed; bottom: 0; left: 0; width: 100%; height: 2.5rem; border-top: .05rem solid #f2f2f2; display: flex; align-items: center; padding: 0 .75rem; justify-content: center;flex-direction: row-reverse; } */
.vip
.footBtn
{
width
:
5.3rem
;
height
:
1.8rem
;
border-radius
:
.9rem
;
background
:
linear-gradient
(
225deg
,
rgba
(
255
,
142
,
0
,
1
)
0%
,
rgba
(
250
,
58
,
81
,
1
)
100%
);
font-size
:
.7rem
;
color
:
#fff
;
text-align
:
center
;
line-height
:
1.8rem
;
}
.vip
.footBox
{
margin-top
:
.3rem
;
width
:
100%
;
height
:
2.5rem
;
display
:
flex
;
align-items
:
center
;
padding
:
0
.75rem
;
justify-content
:
center
;
flex-direction
:
row-reverse
;
}
.vip
.footBtn
{
width
:
5.3rem
;
height
:
1.8rem
;
border-radius
:
.9rem
;
background
:
linear-gradient
(
225deg
,
rgba
(
255
,
142
,
0
,
1
)
0%
,
rgba
(
250
,
58
,
81
,
1
)
100%
);
font-size
:
.7rem
;
color
:
#fff
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.vip
.kaitongVipBG
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
z-index
:
3
;
}
.vip
.kaitongVipBG
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
z-index
:
3
;
}
.vip
.kaitongBox
{
width
:
100%
;
background
:
#fff
;
border-radius
:
.4rem
.4rem
0px
0px
;
overflow
:
hidden
;
padding
:
0
1rem
;
}
.vip
.kaitongBox
{
width
:
100%
;
background
:
#fff
;
border-radius
:
.4rem
.4rem
0px
0px
;
overflow
:
hidden
;
padding
:
0
1rem
;
}
.vip
.ktList
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
margin-top
:
1rem
;
}
.vip
.ktList
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
margin-top
:
1rem
;
}
...
...
sdk/ChuanglanSmsApi.php
0 → 100644
View file @
95915784
<?php
header
(
"Content-type:text/html; charset=UTF-8"
);
/* *
* 类名:ChuanglanSmsApi
* 功能:创蓝接口请求类
* 详细:构造创蓝短信接口请求,获取远程HTTP数据
* 版本:1.3
* 日期:2017-04-12
* 说明:
* 以下代码只是为了方便客户测试而提供的样例代码,客户可以根据自己网站的需要,按照技术文档自行编写,并非一定要使用该代码。
* 该代码仅供学习和研究创蓝接口使用,只是提供一个参考。
*/
class
ChuanglanSmsApi
{
//参数的配置 请登录zz.253.com 获取以下API信息 ↓↓↓↓↓↓↓
const
API_SEND_URL
=
'http://smssh1.253.com/msg/send/json'
;
//创蓝发送短信接口URL
const
API_VARIABLE_URL
=
'http://smssh1.253.com/msg/variable/json'
;
//创蓝变量短信接口URL
const
API_BALANCE_QUERY_URL
=
'http://smssh1.253.com/msg/balance/json'
;
//创蓝短信余额查询接口URL
const
API_ACCOUNT
=
'YZM7675255'
;
// 创蓝API账号
const
API_PASSWORD
=
'S9w8NPx7i'
;
// 创蓝API密码
//参数的配置 请登录zz.253.com 获取以上API信息 ↑↑↑↑↑↑↑
/**
* 发送短信
*
* @param string $mobile 手机号码
* @param string $msg 短信内容
* @param string $needstatus 是否需要状态报告
*/
public
function
sendSMS
(
$mobile
,
$msg
,
$needstatus
=
'true'
)
{
//创蓝接口参数
$postArr
=
array
(
'account'
=>
self
::
API_ACCOUNT
,
'password'
=>
self
::
API_PASSWORD
,
'msg'
=>
urlencode
(
$msg
),
'phone'
=>
$mobile
,
'report'
=>
$needstatus
,
);
$result
=
$this
->
curlPost
(
self
::
API_SEND_URL
,
$postArr
);
return
$result
;
}
/**
* 发送变量短信
*
* @param string $msg 短信内容
* @param string $params 最多不能超过1000个参数组
*/
public
function
sendVariableSMS
(
$msg
,
$params
)
{
//创蓝接口参数
$postArr
=
array
(
'account'
=>
self
::
API_ACCOUNT
,
'password'
=>
self
::
API_PASSWORD
,
'msg'
=>
$msg
,
'params'
=>
$params
,
'report'
=>
'true'
);
$result
=
$this
->
curlPost
(
self
::
API_VARIABLE_URL
,
$postArr
);
return
$result
;
}
/**
* 查询额度
*
* 查询地址
*/
public
function
queryBalance
()
{
//查询参数
$postArr
=
array
(
'account'
=>
self
::
API_ACCOUNT
,
'password'
=>
self
::
API_PASSWORD
,
);
$result
=
$this
->
curlPost
(
self
::
API_BALANCE_QUERY_URL
,
$postArr
);
return
$result
;
}
/**
* 通过CURL发送HTTP请求
* @param string $url //请求URL
* @param array $postFields //请求参数
* @return mixed
*
*/
private
function
curlPost
(
$url
,
$postFields
){
$postFields
=
json_encode
(
$postFields
);
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
array
(
'Content-Type: application/json; charset=utf-8'
//json版本需要填写 Content-Type: application/json;
)
);
curl_setopt
(
$ch
,
CURLOPT_IPRESOLVE
,
CURL_IPRESOLVE_V4
);
//若果报错 name lookup timed out 报错时添加这一行代码
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$ch
,
CURLOPT_POST
,
1
);
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
$postFields
);
curl_setopt
(
$ch
,
CURLOPT_TIMEOUT
,
60
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYHOST
,
0
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
0
);
$ret
=
curl_exec
(
$ch
);
if
(
false
==
$ret
)
{
$result
=
curl_error
(
$ch
);
}
else
{
$rsp
=
curl_getinfo
(
$ch
,
CURLINFO_HTTP_CODE
);
if
(
200
!=
$rsp
)
{
$result
=
"请求状态 "
.
$rsp
.
" "
.
curl_error
(
$ch
);
}
else
{
$result
=
$ret
;
}
}
curl_close
(
$ch
);
return
$result
;
}
}
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment