forked from sillycross/dts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
valid.php
executable file
·34 lines (30 loc) · 1.03 KB
/
valid.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
define('CURSCRIPT', 'valid');
define('IN_GAME', true);
defined('GAME_ROOT') || define('GAME_ROOT', dirname(__FILE__).'/');
require GAME_ROOT.'./include/global.func.php';
include GAME_ROOT.'./include/modules/core/sys/config/server.config.php';
$url = url_dir().'command.php';
$context = array('page'=>'command_valid');
foreach($_POST as $pkey => $pval){
$context[$pkey] = $pval;
}
$cookies = array();
foreach($_COOKIE as $ckey => $cval){
if(strpos($ckey,'user')!==false || strpos($ckey,'pass')!==false) $cookies[$ckey] = $cval;
}
$validinfo = curl_post($url, $context, $cookies);
if(strpos($validinfo, 'redirect')===0){
list($null, $url) = explode(':',$validinfo);
header('Location: '.$url);
exit();
}
if(strpos($validinfo,'<head>')===false){
$d_validinfo = gdecode($validinfo,1);
if(is_array($d_validinfo) && isset($d_validinfo['url']) && 'error.php' == $d_validinfo['url']){
gexit($d_validinfo['errormsg'],__file__,__line__);
}
}
echo $validinfo;
/* End of file valid.php */
/* Location: /valid.php */