代码拉取完成,页面将自动刷新
<?php
/**
* 全能收款码(三码合一收款)
* V1.0
* liukuan
*/
define("IN_QKWEB",true);
require_once("inc/inc.php");
error_reporting(E_ALL ^ E_NOTICE);
require_once("inc/tongji.php");
if (isset($_GET['alipay']) && isset($_GET['wxpay']) || isset($_GET['qqpay']) || isset($_GET['nickname'])) {
$result = $db->getRow("SELECT * FROM qr_pay WHERE ali_pay = '{$_GET['alipay']}' AND wx_pay = '{$_GET['wxpay']}' AND qq_pay = '{$_GET['qqpay']}' AND nickname = '{$_GET['nickname']}' AND isDelete = 0");
if(!$result) {
$id = md5(uniqid());
$db->query("INSERT INTO qr_pay (id, ali_pay, wx_pay, qq_pay, nickname) VALUES ('{$id}', '{$_GET['alipay']}', '{$_GET['wxpay']}', '{$_GET['qqpay']}', '{$_GET['nickname']}' )");
} else {
$id = $result['id'];
}
$qrurl = $siteHost . "/qrcode.php?type=id&payid=" . $id;
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"http://s.dopan.net/create.php");
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$data=array('url'=>$qrurl);
curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
$strRes=curl_exec($ch);
curl_close($ch);
$arrResponse=json_decode($strRes,true);
if($arrResponse['success']==0)
{
if ("对不起,该网址已经存在" == $arrResponse['message']) {
//echo $arrResponse['transurl']."\n";
include "class/phpqrcode.php";
QRcode::png($arrResponse['transurl'], false, 'L', '10', '1');
die;
} else {
/**错误处理*/
echo $arrResponse['message']."\n";
}
} else {
//echo $arrResponse['transurl']."\n";
include "class/phpqrcode.php";
QRcode::png($arrResponse['transurl'], false, 'L', '10', '1');
die;
}
} else {
echo 'param is null';
die;
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。