<?php header("Content-type:text/html;charset=utf-8"); require_once '../filter.php'; require_once './auth_config.php'; $cur_url = "data_save"; $result = hx_auth_valid(); $auth = false; if ($result) { $authcode = str_replace(" ", "+", $_GET["authcode"]); $authcode = hx_authcode($authcode, 'HX_DECODE', $config['hx_auth_key']); $auth_data = explode("|", $authcode); if (is_array($auth_data)) { $auth = true; } else { $url = "error.html?2"; $auth = false; } } else { $url = "error.html?3"; $auth = false; } if (!auth) { header("Location:{$url}"); } if ($auth) { $low = 30; $high = 50; $wecha_id = $auth_data[1]; $createtime = $_POST['createtime']; $score = $_POST['score'];
function hx_auth_url($string, $url = "get_url.php") { global $config; $authcode = hx_authcode($string, 'ENCODE', 'CE612FDDF53FAFE2EB3BBE2522F3A7CD', 1800); $time = time(); $sing_array = array("t" => $time, "authcode" => $authcode); $sign = hx_auth_sign($sing_array); $auth_url = $url . "?sign=" . $sign . "&authcode=" . $authcode . "&t=" . $time; return $auth_url; }