hi guys, yesterday my game has been spammed by Thranduil .
so i decided to make a little mod for us, wich blocks spammers.
the tool simply searches all POST and GET inputs from the user for predefined substrings.
to protect your game make a file called "antispam.php" in basedirectory of your game
Display All
then insert following into game.php and index.php and chat/index.php after <?php
thats it, this protects from all inputs you added to the blocklist. you can also use parts of the url.
don't use this mod, it is uncompleat and will cause errors, new mod will be published soon
hope you enjoy.
so i decided to make a little mod for us, wich blocks spammers.
the tool simply searches all POST and GET inputs from the user for predefined substrings.
to protect your game make a file called "antispam.php" in basedirectory of your game
PHP Source Code: antispam.php
- <?php
- $blocklist = array(//add strings to block in this array you can use full url or just parts of it
- 'eogame.eu',
- 'ogamex.eu',
- 'ogamex',
- 'eogame'
- );
- function array_search_partial($arr, $keyword) {
- foreach($arr as $index => $string) {
- if (strpos(strtolower($string), $keyword) !== FALSE)
- return $index;
- }
- }
- foreach($blocklist as $spam){
- if(array_search_partial($_POST, $spam) != '' || array_search_partial($_GET, $spam) != '')
- die('Spam');
- }
then insert following into game.php and index.php and chat/index.php after <?php
thats it, this protects from all inputs you added to the blocklist. you can also use parts of the url.
don't use this mod, it is uncompleat and will cause errors, new mod will be published soon
hope you enjoy.