Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
config.php 3.26 KB
Copy Edit Raw Blame History
zoeyfRzr authored 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 助手
尝试更多
代码解读
代码找茬
代码优化