Has Any One Got The Codeing For This Please :0)
Started on the old forum in January 2009 · view the original in the archive · old links redirect here
code one man its not that hard have a database were the banned browser and ip are help if browser and ip match give ban message other wise nothing u can do it in a included file so that u dont have to add code to every page
if(isset($_SESSION['username'])) { print "everybody is a little loony inside"; } else { print"You should be shot"; }
QUOTE (jsyguy23 @ Jan 29 2009, 01:22 PM) <{POST_SNAPBACK}>
hi has any one got the codeing for blocked browsers plz
it must put on each page of script
if(isblockedbrowser()) { if(!isshield(getuid_sid($sid))) { echo "<card id="main" title="n3sklub.com">"; echo " "; echo "<img src="images/notok.gif" alt="x"/> "; echo "browser baned! ";
echo "
"; echo "
"; echo "name:"; echo " <input name="nume" format="*x" maxlength="30"/> "; echo "pass:"; echo " <input type="password" name="parola" maxlength="30"/> "; echo "»<anchor>GO<go href="logare.php" method="get">"; echo "<postfield name="nume" value="$(nume)"/>"; echo "<postfield name="parola" value="$(parola)"/>"; echo "</go></anchor>«"; echo " "; echo " © n3sklub.Com"; echo " "; echo "</card>"; echo "</wml>"; exit(); } } ////////core.php function isblockedbrowser() { $text = $_SERVER['HTTP_USER_AGENT']; $rez = mysql_query("SELECT * FROM libwf_blockbrowser"); $i=0; while($row=mysql_fetch_array($rez)) { $var[$i]=$row[1]; $i++; }
$result = count($var);
for ($i=0;$i<$result;$i++) { $ausg = stristr($text, $var[$i]); if(strlen($ausg)>0) { return true; } } return false; } ////end this in data base
--
-- Table structure for table libwf_blockbrowser
CREATE TABLE IF NOT EXISTS ibwf_blockbrowser (
id int(11) NOT NULL auto_increment,
browser varchar(255) NOT NULL default '',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
--
-- Dumping data for table ibwf_blockbrowser
QUOTE (valentin2br @ Jan 29 2009, 05:14 PM) <{POST_SNAPBACK}>
it must put on each page of script if(isblockedbrowser()) { if(!isshield(getuid_sid($sid))) { echo "<card id="main" title="n3sklub.com">"; echo " "; echo "<img src="images/notok.gif" alt="x"/> "; echo "browser baned! ";
echo ""; echo "
"; echo "name:"; echo " <input name="nume" format="*x" maxlength="30"/> "; echo "pass:"; echo " <input type="password" name="parola" maxlength="30"/> "; echo "»<anchor>GO<go href="logare.php" method="get">"; echo "<postfield name="nume" value="$(nume)"/>"; echo "<postfield name="parola" value="$(parola)"/>"; echo "</go></anchor>«"; echo " "; echo " © n3sklub.Com"; echo " "; echo "</card>"; echo "</wml>"; exit(); } } ////////core.php function isblockedbrowser() { $text = $_SERVER['HTTP_USER_AGENT']; $rez = mysql_query("SELECT * FROM libwf_blockbrowser"); $i=0; while($row=mysql_fetch_array($rez)) { $var[$i]=$row[1]; $i++; }
$result = count($var);
for ($i=0;$i<$result;$i++) { $ausg = stristr($text, $var[$i]); if(strlen($ausg)>0) { return true; } } return false; } ////end this in data base
-- -- Table structure for table
libwf_blockbrowserCREATE TABLE IF NOT EXISTS
ibwf_blockbrowser(idint(11) NOT NULL auto_increment,browservarchar(255) NOT NULL default '', PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;-- -- Dumping data for table
ibwf_blockbrowser
heres the original from wapdesire
you could also edit and block a browser and or ip using your ht access page
External image (may be gone) External image (may be gone)
*****
**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***
deny access to evil robots site rippers offline browsers and other nasty scum
RewriteBase / RewriteCond %{HTTP_USER_AGENT} ^Anarchie [OR] RewriteCond %{HTTP_USER_AGENT} ^ASPSeek [OR] RewriteCond %{HTTP_USER_AGENT} ^attach [OR] RewriteCond %{HTTP_USER_AGENT} ^autoemailspider [OR] RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR] RewriteCond %{HTTP_USER_AGENT} ^Xenu [OR] RewriteCond %{HTTP_USER_AGENT} ^Zeus.Webster [OR] RewriteCond %{HTTP_USER_AGENT} ^Zeus RewriteRule ^. - [F,L]
///////////////////////////////////////////////////////////// Or, instead of delivering a friendly error message (i.e., the last line), send these bad boys to the hellish website of your choice by replacing the RewriteRule in the last line with one of the following two examples:
send em to a hellish website of your choice
RewriteRule ^.*$ http://www.hellish-website.com [R,L]
External image (may be gone) External image (may be gone)
*****
**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***