Hey coderz, im usin wapdesirev2 and iv noticed ppl that r tryin to spam ya site use opera mini so im askn how do i block opera mini on the v2 script, iv tried doin it but cnt work it grr. . . can u tell me what i do or what i type in pls
Opera mini is wank
Collapse
X
-
You can try this.
PHP Code:
$ua = $_SERVER['HTTP_USER_AGENT'];
$var[1] = 'Opera/9.80';
$result = count($var);
for ($i=0;$i<$result;$i++)
$check = stristr($ua, $var[$i]);
if(strlen($check)>0) {
echo 'USERAGENT HAS BEING BANNED....(type your message here.';
echo "</body>";
echo "</html>";
die();
}
Comment
-
Originally posted by Lee View PostHey coderz, im usin wapdesirev2 and iv noticed ppl that r tryin to spam ya site use opera mini so im askn how do i block opera mini on the v2 script, iv tried doin it but cnt work it grr. . . can u tell me what i do or what i type in pls
PHP Code:<?php
$notallowed = "notallowed.php";
$text = $_SERVER['HTTP_USER_AGENT'];
$var[0] = 'J2ME';
//$var[1] = 'WinWAP';
//$var[2] = 'Phonifier';
//$var[3] = 'ANOTHER NOT ALLOWED BROWSER';
//$var[4] = 'another example...';
$result = count($var);
for ($i=0;$i<$result;$i++)
{
$ausg = stristr($text, $var[$i]);
if(strlen($ausg)>0)
{
header("location: $notallowed");
echo "This browser not allowed here!<br/><br/>please come back<br/>with your phone browser.";
break;
}
}
?>
PHP Code:include("browser.php");
and in notallowed.php put whatever you want to
old fashion.. but works well ;)It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ â“â“¡â“” â“ⓑⓛⓔ ⓣⓞ â“—â“”â“â“¡ !
ιη тнєσÑу, тнє ÏÑα¢тι¢є ιѕ α Ñєѕυℓт σƒ тнє тнєσÑу, вυт ιη ÏÑα¢тι¢є ιѕ тнє σÏÏσѕιтє.
Comment
Comment