Opera mini is wank
Started on the old forum in August 2010 · view the original in the archive · old links redirect here
if (isset($HTTP_SERVER_VARS['HTTP_X_OPERAMINI_PHONE_UA'])) {
exit();
}
put it on the top of your php page where you would like to block opera mini.
Advertise your mobile site for FREE with AdTwirl
You can try this.
$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();
}
if it crashes your site use:
if (isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])) {
exit();
}
Lee wrote: 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
save this to browser.php
<?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;
}
}
?>
and put this:
include("browser.php");
in every file/page where you want to block it... 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. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
ori wrote: the v2 has a built in useragent blocker so how is this a problem?
exactly lol just type opera into blocked browsers and networks in your tools