Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Apsauga nuo proxy

Parašė -Donatas· 2012 Sau. 5 00:01:48
#1

Reikia pakvietimų sistemai apsaugos nuo proxy. Naudoju šia sistemą http://phpfusion.lt/infusions/mo...mod_id=520 invite.php:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: downloads.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
$vers = explode(".",$settings['version']);
if($vers['0'] == 7) {
require_once THEMES."templates/header.php";
} else {
require_once "subheader.php";
require_once "side_left.php";
define("DB_USERS", DB_PREFIX."users");
}

define("DB_INVITES", DB_PREFIX."invites");
$invite = @$_GET['invite'];
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE `user_id`='$invite'");
$narys = dbarray(dbquery("SELECT * FROM ".DB_USERS." WHERE `user_id`='$invite'"));
if(!isset($invite) || !isNum($invite) || !dbrows($result)) redirect(BASEDIR."./");
if($vers['0'] == 7) {
add_to_title(" - Tave pakvietė ".$narys['user_name']);
}

//Kodas kuris blokuoja Proxy Serverius (nevisus)
$IP = $_SERVER['REMOTE_ADDR'];
$proxy = "95.154.230.253}{66.90.104.167}{74.208.103.234}{66.23.231.138}{178.162.147.101}{208.115.219.75}{173.213.68.8}{94.228.214.128}{173.192.94.151}{204.197.240.62}{184.154.46.2}{72.55.156.58}{67.23.242.32}{66.90.104.167}{66.90.104.167}{99.198.127.150}{99.198.127.150}{99.198.127.150}{99.198.127.150}{geometrytunnel.com}{proxify.net}{newproxynetwork.com}{freesurfproxy.com}{miniprox.com}{ipbgone.com}{fiberprox.me}{www.rapidproxy.org}{www.sweetdreamsaremadeofthese.info}{securehole.com}{www.tornadoproxy.com}{backdoor4all.info}{3.hidemyass.com}{4.hidemyass.com";
$proxy_sarasas=explode("}{", $proxy);
if (in_array($IP, $proxy_sarasas)) {
echo '<style>
paryskinta { font-weight: bold; }
tablez { border: 1px solid gray;}
tdz { text-align: center; padding: 25;}
</style>';
die('<center><tablez>
<tr><tdz><paryskinta>Stop: isjunk Proxy! Tada meginkite dar karta.</paryskinta></tdz></tr>
</tablez></center>');
}

$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_ip='$IP' ORDER BY user_id");
$ieskoti = dbarray($result);

$versija = explode(".",$settings['version']);
if($versija['0'] == 7) {
require_once THEMES."templates/header.php";
} else {
require_once "subheader.php";
require_once "side_left.php";
}

$data = dbarray(dbquery("SELECT * FROM `".DB_INVITES."` WHERE `invite_user_id`='$invite' AND `invite_guest_ip`='".USER_IP."' ORDER by invite_time DESC LIMIT 1"));

if($data['invite_time']  + 60 * 60 * 24 > time()) {
opentable("Jus į šį puslapį pakvietė ".$narys['user_name']);
echo "Tačiau, jo pakvietimas jam nedavė taŠkų, kuriuos galėtų išleisti mūsų puslapyje, nes jūs jau apsilankėte per šio nario nuorodą ankščiau, nei per 24h.";
closetable();
} elseif($data['invite_time']  + 60 * 60 * 24 < time()) {
$result = dbquery("INSERT INTO `".DB_INVITES."` (invite_time, invite_user_id, invite_guest_ip) VALUES ('".time()."', '$invite', '".USER_IP."')");
opentable("Jus į šį puslapį pakvietė ".$narys['user_name']);
echo "Ačiū, kad užsukote į mūsų puslapį.<br>Tikimės, kad jūs lankysitės čia dažniau.";
closetable();
}

if($vers['0'] == 7) {
require_once THEMES."templates/footer.php";
} else {
require_once "side_right.php";
require_once "footer.php";
}
?>




Bandžiau įlipdyt šitą kodą, bet nepadėjo.
//Kodas kuris blokuoja Proxy Serverius (nevisus)
$IP = $_SERVER['REMOTE_ADDR'];
$proxy = "95.154.230.253}{66.90.104.167}{74.208.103.234}{66.23.231.138}{178.162.147.101}{208.115.219.75}{173.213.68.8}{94.228.214.128}{173.192.94.151}{204.197.240.62}{184.154.46.2}{72.55.156.58}{67.23.242.32}{66.90.104.167}{66.90.104.167}{99.198.127.150}{99.198.127.150}{99.198.127.150}{99.198.127.150}{geometrytunnel.com}{proxify.net}{newproxynetwork.com}{freesurfproxy.com}{miniprox.com}{ipbgone.com}{fiberprox.me}{www.rapidproxy.org}{www.sweetdreamsaremadeofthese.info}{securehole.com}{www.tornadoproxy.com}{backdoor4all.info}{3.hidemyass.com}{4.hidemyass.com";
$proxy_sarasas=explode("}{", $proxy);
if (in_array($IP, $proxy_sarasas)) {
echo '<style>
paryskinta { font-weight: bold; }
tablez { border: 1px solid gray;}
tdz { text-align: center; padding: 25;}
</style>';
die('<center><tablez>
<tr><tdz><paryskinta>Stop: isjunk Proxy! Tada meginkite dar karta.</paryskinta></tdz></tr>
</tablez></center>');
}

$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_ip='$IP' ORDER BY user_id");
$ieskoti = dbarray($result);

$versija = explode(".",$settings['version']);
if($versija['0'] == 7) {
require_once THEMES."templates/header.php";
} else {
require_once "subheader.php";
require_once "side_left.php";
}




Prašau pagalbos :)

P.S php fusion v7.