FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
weworkapi_php/callback/callbackverify.php at master · EternalSuno/weworkapi_php · GitHub
EternalSuno
/
weworkapi_php
Public
forked from
sbzhu/weworkapi_php
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
weworkapi_php
/
callback
/
callbackverify.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
31 lines (23 loc) · 984 Bytes
Breadcrumbs
weworkapi_php
/
callback
/
callbackverify.php
Copy path
File metadata and controls
executable file
·
31 lines (23 loc) · 984 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
include_once
"
WXBizMsgCrypt.php
"
;
// 假设企业号在公众平台上设置的参数如下
$
encodingAesKey
=
"
jWmYm7qr5nMoAUwZRjGtBxmz3KA1tkAj3ykkR6q2B2C
"
;
$
token
=
"
QDG6eK
"
;
$
receiveid
=
"
wx5823bf96d3bd56c7
"
;
$
wxcpt
=
new
WXBizMsgCrypt
(
$
token
,
$
encodingAesKey
,
$
receiveid
);
// http://cq.xuduan.tech:62606/weworkapi_php/callback_json/callbackverify.php?msg_signature=5c45ff5e21c57e6ad56bac8758b79b1d9ac89fd3×tamp=1409659589&nonce=263014780&echostr=P9nAzCzyDtyTWESHep1vC5X9xho%2FqYX3Zpb4yKa9SKld1DsH3Iyt3tP3zNdtp%2B4RPcs8TgAE7OaBO%2BFZXvnaqQ%3D%3D
//
// get the paramters
$
sVerifyMsgSig
=
$
_GET
[
'
msg_signature
'
];
$
sVerifyTimeStamp
=
$
_GET
[
'
timestamp
'
];
$
sVerifyNonce
=
$
_GET
[
'
nonce
'
];
$
sVerifyEchoStr
=
$
_GET
[
'
echostr
'
];
$
sEchoStr
=
""
;
// call verify function
$
errCode
=
$
wxcpt
->
VerifyURL
(
$
sVerifyMsgSig
,
$
sVerifyTimeStamp
,
$
sVerifyNonce
,
$
sVerifyEchoStr
,
$
sEchoStr
);
if
(
$
errCode
==
0
) {
echo
$
sEchoStr
.
"\n"
;
}
else
{
print
(
"
ERR:
"
.
$
errCode
.
"\n\n"
);
}
?>
Back
|
FazBrowse Home
|
New Git URL