添加后台代理代码

This commit is contained in:
2026-03-15 01:27:05 +08:00
parent 11f9ac4dc1
commit ea08c9366a
5254 changed files with 721042 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
/**
* Created by PhpStorm.
* User: win7
* Date: 2017-07-06
* Time: 11:36
*/
class publicData
{
public static $_instance;
public $game_config;
private function __construct()
{
//ts待定2021
$this->game_config = file_get_contents('update_jsonv2.txt');
//$url = 'http://ylyxservice1.willgames.cn/config/update_json.txt?v='.time();
//$this->game_config = file_get_contents($url);
}
private function __clone()
{
// TODO: Implement __clone() method.
}
public static function getInstance()
{
if (!(self::$_instance instanceof self)) {
self::$_instance = new self();
}
return self::$_instance;
}
public function getConfig()
{
return $this->game_config;
}
}

View File

@@ -0,0 +1,72 @@
<?php
/**
* Created by PhpStorm.
* User: win7
* Date: 2017-07-03
* Time: 15:17
*/
class usefull
{
public static $_instance;
private function __construct()
{
}
private function __clone()
{
// TODO: Implement __clone() method.
}
public static function getInstance()
{
if(!(self::$_instance instanceof self))
{
self::$_instance = new self();
}
return self::$_instance;
}
public function check_name($name)
{
$nickname = str_replace(array("&","'", '"'),"", $name);
$nickname = $this->removeEmoji($nickname);
if(empty($nickname))
{
$nickname = '表情符号';
}
$nickname = trim($nickname);
if(empty($nickname))
{
$nickname='@#$2017';
}
return $nickname;
}
public function removeEmoji($text) {
$clean_text = "";
// Match Emoticons
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u';
$clean_text = preg_replace($regexEmoticons, '', $text);
// Match Miscellaneous Symbols and Pictographs
$regexSymbols = '/[\x{1F300}-\x{1F5FF}]/u';
$clean_text = preg_replace($regexSymbols, '', $clean_text);
// Match Transport And Map Symbols
$regexTransport = '/[\x{1F680}-\x{1F6FF}]/u';
$clean_text = preg_replace($regexTransport, '', $clean_text);
// Match Miscellaneous Symbols
$regexMisc = '/[\x{2600}-\x{26FF}]/u';
$clean_text = preg_replace($regexMisc, '', $clean_text);
// Match Dingbats
$regexDingbats = '/[\x{2700}-\x{27BF}]/u';
$clean_text = preg_replace($regexDingbats, '', $clean_text);
return $clean_text;
}
}