Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
[REL] AntiSulake PHP Class (For All CMS)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="At0m" data-source="post: 94061" data-attributes="member: 6932"><p style="text-align: center"></p> <p style="text-align: center"><strong>AntiSulake Class</strong></p> <p style="text-align: center">Creator: Leo "At0m" Xgr</p> <p style="text-align: center">Version: 1.0.0 [BETA]</p> <p style="text-align: center"></p> <p style="text-align: center"></p> <p style="text-align: center"><strong>About</strong></p> <p style="text-align: center">Hi there... Inspired by leenster´s little script of avoid Sulake, i have created a class, more improved, that is compatible with all CMS´S. With this script you avoid that employees of the company register on your hotel.</p> <p style="text-align: center"></p> <p style="text-align: center"><strong>How to Use</strong></p> <p style="text-align: center">First, create a PHP file with the name <strong>antisulake.php</strong> and copy all the class code and than save it.</p> <p style="text-align: center"></p> <p style="text-align: center">Example: How to work using UberCMS: Just put in the Global.php(The central file of the php classes) the code:</p> <p style="text-align: center">[php]$antiSulake = new AntiSulake();[/php]</p> <p style="text-align: center">But first you have to put a <strong>require_once 'antisulake.php';</strong> in the code of the global...</p> <p style="text-align: center"></p> <p style="text-align: center">Just this ? Yep´, it´s ready. You can make this in other´s CMS.</p> <p style="text-align: center"></p> <p style="text-align: center"><strong>The Code</strong></p> <p style="text-align: center"></p><p>[php]/* Início das Classe */</p><p> class AntiSulake</p><p> {</p><p> /* ---------------------------------------------\</p><p> | AntiSulake Protection v1.0.0 [BETA] |</p><p> | --------------------------------------------- |</p><p> | Taken from upcoming At0m´s RetroCMS |</p><p> | Created by: Leo "At0m" Xgr - at0m@live.com |</p><p> \----------------------------------------------*/</p><p> </p><p> /* Início - [ Atributos ] */</p><p> public $urlRedirect = "http://youfaileverything.org/"; /* YouFail Sulake */</p><p> public $protectionStatus = true; /* true = Website Protegido / false = Website Desprotegido */</p><p> private $currentHostname; /* Hostname do Visitante */</p><p> private $currentIp; /* Ip do Visitante */</p><p> private $blockedHosts = array("gate.sulake.com", "sulake.com"); /* Sites bloqueados de visitar */</p><p> /* Fim - [ Atributos ] */</p><p> </p><p> /* Início - [ Construtor ] */</p><p> function __construct(){</p><p> if($this->protectionStatus){ if($this->getCurrentHostname()) { if($this->blockSulake() != false) { header('Location: '.$this->urlRedirect.''); } } }</p><p> }</p><p> /* Fim - [ Construtor ] */</p><p> </p><p> /* Início - [ Métodos ] */</p><p> private function getCurrentHostname(){</p><p> /* Requerimento de Informações */</p><p> if(getenv("HTTP_CLIENT_IP")){ $ip = getenv("HTTP_CLIENT_IP");} </p><p> else if(getenv("HTTP_X_FORWARDED_FOR")) { $ip = getenv("HTTP_X_FORWARDED_FOR"); }</p><p> else if(getenv("REMOTE_ADDR")) { $ip = getenv("REMOTE_ADDR"); }</p><p> else { $ip = "0.0.0.0"; }</p><p> </p><p> /* Atribui o valor do Hostname/IP do visitante. */</p><p> $this->currentHostname = gethostbyaddr($ip);</p><p> $this->currentIp = $ip;</p><p> </p><p> /* Encontramos algo ? */</p><p> if(empty($this->currentHostname) && empty($this->currentIp)){</p><p> return (boolean)false;</p><p> } return (bool)true;</p><p> }</p><p> </p><p> public function blockSulake(){</p><p> $weLoveSusu = array();</p><p> /* Verifica primeiro se host possui algo com Sulake */</p><p> foreach($this->blockedHosts as $hosts){ if(strpos(strtolower($this->currentHostname), strtolower($hosts)) !== false){ $weLoveSusu[] = true; } }</p><p> if(count($weLoveSusu) > 0) { return (boolean)true; } return false;</p><p> }</p><p> /* Fim - [ Métodos ] */ </p><p> }</p><p> /* Fim da Classe */[/php]</p><p style="text-align: center"></p> <p style="text-align: center"><strong>If you like it, please say loud, WE LOVE SUSU(Sulake) <3.</strong></p> <p style="text-align: center"></p></blockquote><p></p>
[QUOTE="At0m, post: 94061, member: 6932"] [CENTER] [B]AntiSulake Class[/B] Creator: Leo "At0m" Xgr Version: 1.0.0 [BETA] [B]About[/B] Hi there... Inspired by leenster´s little script of avoid Sulake, i have created a class, more improved, that is compatible with all CMS´S. With this script you avoid that employees of the company register on your hotel. [B]How to Use[/B] First, create a PHP file with the name [B]antisulake.php[/B] and copy all the class code and than save it. Example: How to work using UberCMS: Just put in the Global.php(The central file of the php classes) the code: [php]$antiSulake = new AntiSulake();[/php] But first you have to put a [B]require_once 'antisulake.php';[/B] in the code of the global... Just this ? Yep´, it´s ready. You can make this in other´s CMS. [B]The Code[/B] [/CENTER] [php]/* Início das Classe */ class AntiSulake { /* ---------------------------------------------\ | AntiSulake Protection v1.0.0 [BETA] | | --------------------------------------------- | | Taken from upcoming At0m´s RetroCMS | | Created by: Leo "At0m" Xgr - at0m@live.com | \----------------------------------------------*/ /* Início - [ Atributos ] */ public $urlRedirect = "http://youfaileverything.org/"; /* YouFail Sulake */ public $protectionStatus = true; /* true = Website Protegido / false = Website Desprotegido */ private $currentHostname; /* Hostname do Visitante */ private $currentIp; /* Ip do Visitante */ private $blockedHosts = array("gate.sulake.com", "sulake.com"); /* Sites bloqueados de visitar */ /* Fim - [ Atributos ] */ /* Início - [ Construtor ] */ function __construct(){ if($this->protectionStatus){ if($this->getCurrentHostname()) { if($this->blockSulake() != false) { header('Location: '.$this->urlRedirect.''); } } } } /* Fim - [ Construtor ] */ /* Início - [ Métodos ] */ private function getCurrentHostname(){ /* Requerimento de Informações */ if(getenv("HTTP_CLIENT_IP")){ $ip = getenv("HTTP_CLIENT_IP");} else if(getenv("HTTP_X_FORWARDED_FOR")) { $ip = getenv("HTTP_X_FORWARDED_FOR"); } else if(getenv("REMOTE_ADDR")) { $ip = getenv("REMOTE_ADDR"); } else { $ip = "0.0.0.0"; } /* Atribui o valor do Hostname/IP do visitante. */ $this->currentHostname = gethostbyaddr($ip); $this->currentIp = $ip; /* Encontramos algo ? */ if(empty($this->currentHostname) && empty($this->currentIp)){ return (boolean)false; } return (bool)true; } public function blockSulake(){ $weLoveSusu = array(); /* Verifica primeiro se host possui algo com Sulake */ foreach($this->blockedHosts as $hosts){ if(strpos(strtolower($this->currentHostname), strtolower($hosts)) !== false){ $weLoveSusu[] = true; } } if(count($weLoveSusu) > 0) { return (boolean)true; } return false; } /* Fim - [ Métodos ] */ } /* Fim da Classe */[/php] [CENTER] [B]If you like it, please say loud, WE LOVE SUSU(Sulake) <3.[/B] [/CENTER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
[REL] AntiSulake PHP Class (For All CMS)
Top