最近很火的支付寶瓜分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>
!!!裝載請標明出處!!!

歡迎留言

江苏e球彩开奖结果图