最近很火的支付宝瓜分15亿活动,直接复制唤起支付宝APP(微信中唤不起,但是会有提示,其他的可自己研究)
QQ20181214-0.jpg 

代码如下,创建php文件,复制代码,访问即可!
(仅需修改[搜索码]跟[二维码地址])

<?php
$number = "577988004"; // 搜索码
$qrname = "http://wx2.sinaimg.cn/mw690/0060lm7Tly1fy6cxopidqj30fr0nogn8.jpg"; //扫红包的二维码图片地址
$phone = false; //手机
$iswx = 0;
$alert = "搜索码复制成功,请在支付宝首页粘贴搜索!";
if (checkmobile()) {
	$phone = ture;
	$aliurl = "alipays://";
} else {
	$aliurl = "#";
}
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false) {
	$phone = true;
	$iswx = 1;
	$alert = "搜索码复制成功,请在支付宝APP首页粘贴搜索!";
}
function checkmobile() {
	$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
	$ualist = array('android', 'midp', 'nokia', 'mobile', 'iphone', 'ipod', 'blackberry', 'windows phone');
	if ((dstrpos($useragent, $ualist) || strexists($_SERVER['HTTP_ACCEPT'], "VND.WAP") || strexists($_SERVER['HTTP_VIA'], "wap"))) {
		return true;
	} else {
		return false;
	}
}
function strexists($string, $find) {
	return !(strpos($string, $find) === FALSE);
}
function dstrpos($string, $arr) {
	if (empty($string)) {
		return false;
	}

	foreach ((array) $arr as $v) {
		if (strpos($string, $v) !== false) {
			return true;
		}
	}
	return false;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
 <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"  name="viewport" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>仅需两步瓜分支付宝15亿</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="icon" href="https://render.alipay.com/favicon.ico" />
<script type="text/javascript" src="http://www.zongzi.ink/addons/attachlink/static/js/clipboard.min.js"></script>
<script type="text/javascript" src="http://www.zongzi.ink/public//js/jquery-1.8.3.min.js"></script>
<style type="text/css">

.buttons { /* 按钮美化 */
	width: 100%;
	height: 40px;
	border-width: 0px;
	border-radius: 3px;
	background: #1E90FF;
	cursor: pointer;
	outline: none;
	font-family: Microsoft YaHei;
	color: white;
	font-size: 17px;
}
.runNum{
            margin: 0 auto;
            padding: 0;
            overflow: hidden;
            height: 50px;
            line-height: 50px;
            border-top: #CCCCCC solid 1px;
            border-bottom: #CCCCCC solid 1px;
            text-align: center;
            font-weight: bold;
            position: relative;
            letter-spacing:6px;
        }
        .runNum>li{
            list-style: none;
            width: 40px;
            float: left;
            position: absolute;

        }

</style>
<script type="text/javascript">
	document.onmousedown = function mdClick(event) {
	    var e = event || window.event || arguments.callee.caller.arguments[0];
	    if (e.button == 2 || e.button == 3) {
	        mAlert();
	    }
	}
	document.oncontextmenu = new Function("return false;");
	document.onkeydown = document.onkeyup = document.onkeypress = function(event) {
    var e = event || window.event || arguments.callee.caller.arguments[0];

	    if (e && e.keyCode == 123) {
	            mAlert();
	            e.returnValue = false;
	            return (false);
	    }
	}
function mAlert(){
	alert("感谢您的使用");
}
var copy = 0;
var iswx = <?=$iswx?>;
</script>
</head>
<body style="text-align: center;">
<div >
<?php
if ($phone) {
	?>

<span style="font-size: 24px;display: none;">两步瓜分支付宝15亿</span>

<br><br>
	  <button data-clipboard-text="<?=$number?>" class="alinumber buttons" >第一步:点击复制搜索码</button>
	<div id="errortis" style="font-size: 16px;visibility: hidden;" >

<small id="smallspan" style="margin-bottom: -28px;display: block;text-align: left;margin-left: 25px;color:gray;">请手动复制下方搜索码</small>
		<div style="margin: 30px auto;width: 320px;font-size:40px;">
		    <ul class="runNum" id="test"><?=$number?></ul>
		</div>

	</div>



	   <a href="alipays://" class="buttons"   onclick="return check()" style="display: block;line-height: 40px;text-decoration: none;">第二步:点击唤起支付宝</a>
	   <br><br>
	  <img src="thttp://wx4.sinaimg.cn/mw690/0060lm7Tly1fy6cvn6emoj30yh0u07ud.jpg" width="100%">  <br><br>
	<?php
} else {
	?>

<h3>请使用支付宝APP扫描下方二维码</h3>
	    <img src="http://wx1.sinaimg.cn/mw690/0060lm7Tly1fy6cwx23crj31280lw145.jpg" width="100%">  <br><br>
<img src="<?=$qrname?>" width="100%">
	<?php
}
?>

<footer style="font-size: 12px;color: gary;margin-top:30px;">蚂蚁金服 | 支付宝APP | 阿洋</footer>

</div>



<script type="text/javascript">

	function check(){

		if(copy!=1){
			alert("请您先确保已完成第一步!")
			return false;
		}else{
			if(iswx ==1) {
				alert("微信中无法唤起支付宝,请您手动打开支付宝APP");
				return false;
			}
			return true;
		}
	}

var clipboard = new Clipboard('.alinumber');
    clipboard.on('success', function(e) {
    	copy=1;
            $("#smallspan").css("margin-top","28px");
            $("#smallspan").text("成功复制搜索码!");
            $("#errortis").css("visibility","visible");
            alert("<?=$alert?>");
             e.clearSelection();
    });
    clipboard.on('error', function(e) {
    	copy=1;
    	$("#smallspan").css("margin-top","28px");
    	$("#errortis").css("visibility","visible");
              alert("复制失败,请手动复制页面上的搜索码!");
    });

</script>

</body>
</html>
!!!装载请标明出处!!!

欢迎留言

1 条评论