Opera mini is wank

Started on the old forum in August 2010 · view the original in the archive · old links redirect here

#block-opera-mini

7 replies · 680 views · started 16 years ago · 1 min read

7 participants
Lee Junior · 17 posts #1

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

GumSlone Administrator Principal · 1,690 posts #2
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

External image (may be gone)

Lee Junior · 17 posts #3

hey mate just tried that and crashes my site lol

do u know how to just block the mini browser in blocked browsers?

ARMFLEXX Newbie · 1 posts #4

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();
}
something else Fellow · 2,296 posts #5

if it crashes your site use:

if (isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])) { 
      exit(); 
    } 
metulj Super moderator Principal · 1,726 posts #6

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 Lead · 512 posts #7

the v2 has a built in useragent blocker so how is this a problem?

woody Developer · 176 posts #8

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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close