<?php /** * * WeChat Interface for WeChat Subscribers Lite * * * */ global $token; define('IS_DEBUG', false); $wechatObj = new wechatCallbackapi($token); $valid = $wechatObj->valid(); if ($valid) { $wechatObj->responseMsg(get_data()); } else { header('Location: ' . home_url()); } exit; class wechatCallbackapi { private $token; private $data; public function __construct($_token, $_data = null) { $this->token = $_token; if ($_data != null) { $this->load($_data); } } public function load($_data)
<?php define('IN_ECS', true); error_reporting(0); require dirname(__FILE__) . '/../includes/init.php'; require 'callback.php'; $wechatObj = new wechatCallbackapi(); $wechatObj->valid($db); $base_url = 'http://' . $_SERVER['SERVER_NAME'] . '/'; $db->prefix = $ecs->prefix; $wechatObj->responseMsg($db, $user, $base_url);
<?php define('IN_HHS', true); //error_reporting(0); require dirname(__FILE__) . '/../includes/init2.php'; require 'callback.php'; $wechatObj = new wechatCallbackapi(); $ecdb->prefix = $hhs->prefix; $wechatObj->valid($db, $ecdb); $base_url = 'http://' . $_SERVER['SERVER_NAME'] . '/'; $db->prefix = $hhs->prefix; $wechatObj->responseMsg($db, $user, $base_url);