方法:这个技术个人觉得有点难,因为微信还没开放接口,不过一位朋友给了我整套代码,这代码是通用的,非常的好用,另外他还说,微信公众号也可以实现相同的功能,他的企鹅号(一 一 四二巴七巴零九一),如果有这样的需求的伙伴,不妨去联系下他吧,其他关于开发的技术他也知道。一起去学习吧
微信相关URL Scheme参数weixin://dl/scan 扫一扫weixin://dl/feedback 反馈weixin://dl/moments 朋友圈weixin://dl/settings 设置weixin://dl/notifications 消息通知设置weixin://dl/chat 聊天设置weixin://dl/general 通用设置weixin://dl/officialaccounts 公众号weixin://dl/games 游戏weixin://dl/help 帮助weixin://dl/feedback 反馈weixin://dl/profile 个人信息weixin://dl/features 功能插件
这广告迫不及防啊
来看看赚点积分
来看看赚点积分
来看看赚点积分
来看看赚点积分
这是效果图,看能不能帮助到你们
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
跳转微信中
<?php
// 统一调用微信白名单接口:https://wq.jd.com/mjgj/link/GetOpenLink?callback=getOpenLink&rurl=https://dc2.jd.com/auto.php?service=transfer&type=pms&to=(这里是拼接自己的内容地址比如http://mjbbs.jd.com/data/attachment/forum/201806/08/173526pb2zpjzzooo2ofze.jpg)<!--了解具体流程的联系QQ:1142878091-->
if($_GET['t']){
// include("admin/config.php");
// include("admin/function.php");
$code = $_GET['t'];
$info = query ( "jump_logs", "where code='" . $code . "'" );
if($info['code'] == ''){
echo '跳转失败';
exit(0);
}
if($info['state'] == '1'){
if($info['count'] >= $info['num']){
echo '跳转失败';
exit(0);
}
$time = strtotime($info['time']);
if(time() > $time){
echo '跳转失败';
exit;
}
}else{
echo '跳转失败';
exit;
}
if($info['www_url'] == ''){
echo '请先配置落地页';
exit;
}else{
$w_url_code = $info['rl'];
}
?>
*{ margin:0 auto;}html,body{height:100%;}.container {margin-top: 100px;text-align: center;}.icon {width: 70px;height: 70px;}#ellipsis {display: inline-block;width: 0;}
正在跳转到微信
var ellipsis = [' ', '. ', '.. ', '...'];
var index = 0;
var $ellipsis = document.getElementById('ellipsis');
setInterval(function () {
$ellipsis.innerHTML = ellipsis[index++ % 4];
}, 500);
<?php
function get_ticket($code){
//初始化
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // https请求 不验证证书和hosts
$headers = array();
$headers[] = 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/15B202 UCBrowser/11.7.7.1031 Mobile AliApp(TUnionSDK/0.1.20)';
$headers[] = 'Referer: https://m.mall.qq.com/release/?busid=mxd2&ADTAG=jcp.h5.index.dis';
$headers[] = 'Content-Type:application/x-www-form-urlencoded; charset=UTF-8';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$content = curl_exec($ch);
curl_close($ch);
//$arr = json_decode($content,1);
//if($arr['success'] == '1'){
// $shotCode = $arr['shotCode'];
//}else{
// $shotCode = '';
//}
//preg_match('/openlink\":\"(.*?)\"}/',$content,$result);
//$url = $result[1];
// <!--要免费源码的伙伴联系QQ:1142878091-->
preg_match('/href=\"(.*?)#wechat/',$content,$result);
$url = $result[1];
return $url;
}
$time = time()-$info['ticket_time'];
$minute=floor($time/60);
query_update ( "jump_logs", "count=count+1". " where code='" . $code . "'" );
if($minute >= 59){
//如果超过1小时,更新ticket
$url = get_ticket($w_url_code);
if($url){
query_update ( "jump_logs", "ticket_time='".time()."', ticket='" . $url . "' where code='" . $code . "'" );
$ticket_url = $url.'#';
if(strpos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp')||strpos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp')){//安卓百度手机APP
echo 'window.location.href = "bdbox://utils?action=sendIntent&minver=7.4¶ms=%7b%22intent%22%3a%22'.$url.'%23wechat_redirect%23wechat_redirect%23Intent%3bend%22%7d";';
}else{
echo 'window.location.href = "'.$ticket_url.'";';
}
}
}else{
$ticket_url = $info['ticket'].'#';
if(strpos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp')||strpos($_SERVER['HTTP_USER_AGENT'], 'baiduboxapp')){//安卓百度手机APP
echo 'window.location.href = "bdbox://utils?action=sendIntent&minver=7.4¶ms=%7b%22intent%22%3a%22'.$info['ticket'].'%23wechat_redirect%23wechat_redirect%23Intent%3bend%22%7d";';
}else{
echo 'window.location.href = "'.$ticket_url.'";';
}
}
}
?>
人家起码愿意分享代码,帮忙解决了我的问题
这广告迫不及防啊
兄弟,居然把源码都发我了,很感谢你
来看看赚点积分
来看看赚点积分
来看看赚点积分
来看看赚点积分
来看看赚点积分