can some one take opera mini block off

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

8 replies · 726 views · started 17 years ago · 1 min read

4 participants
brand Senior · 391 posts #1

here is my page where i found opera mini in this file

<?php
function ip()
{
if($_SERVER["REMOTE_ADDR"]){$ip=$_SERVER["REMOTE_ADDR"];}
else{$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];}
if(strpos($ip,",")){
$exp_ip=explode(",",$ip);
$ip=$exp_ip[0];
}
return $ip;
}

function subno()
{
if($_SERVER["HTTP_X_UP_SUBNO"]){$subno=$_SERVER["HTTP_X_UP_SUBNO"];}
else{$subno=gethostbyaddr(ip());}
if($subno==""){
$exp_ip=explode(",",ip());
$subno=gethostbyaddr($exp_ip[0]);
}
return $subno;
}

function browser()
{
$browser=preg_replace("/ (.*)/", ")", $_SERVER["HTTP_USER_AGENT"]);
$browser=str_replace("/","(",$browser);
if(strpos($_SERVER["HTTP_USER_AGENT"],"Nokia")==true){
$browser=explode("Nokia",$_SERVER["HTTP_USER_AGENT"]);
$browser=explode("/","Nokia".$browser[1]);
$browser=$browser[0];
}
else if(strpos($_SERVER["HTTP_USER_AGENT"],"es65")==true){
$browser="NokiaE65";
}
else if(mobile()){
$browser=explode("/",$_SERVER["HTTP_USER_AGENT"]);
$browser=$browser[0];
}
else if(strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 7.0")==true){$browser="Internet Explorer(7.0)";}
else if(strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 6.0")==true){$browser="Internet Explorer(6.0)";}
else if(strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/")==true){
$browser=explode("Firefox/",$_SERVER["HTTP_USER_AGENT"]);
$browser="Firefox(".$browser[1].")";
}
///////////////////////////////////////////////////////////////
else if(strpos($_SERVER["HTTP_USER_AGENT"],"Opera Mini")==true){
$browser=str_replace("/","(",preg_replace("/ (.*)/", " Opera Mini)", $_SERVER["HTTP_USER_AGENT"]));
}
return $browser;
}
////////////////////////////////////////////////////////////////
function mobile(){
//check if the user agent value claims to be windows but not windows mobile
if(stristr($_SERVER['HTTP_USER_AGENT'],'windows')&&!stristr($_SERVER['HTTP_USER_AGENT'],'windows ce')){
return false;
}
//check if the user agent gives away any tell tale signs it's a mobile browser
if(eregi('up.browser|up.link|windows ce|iemobile|mini|mmp|symbian|midp|wap|phone|pocket|mobile|pda|psp',$_SERVER['HTTP_USER_AGENT'])){
return true;
}
//check the http accept header to see if wap.wml or wap.xhtml support is claimed
if(stristr($_SERVER['HTTP_ACCEPT'],'text/vnd.wap.wml')||stristr($_SERVER['HTTP_ACCEPT'],'application/vnd.wap.xhtml+xml')){
return true;
}
//check if there are any tell tales signs it's a mobile device from the _server headers
if(isset($_SERVER['HTTP_X_WAP_PROFILE'])||isset($_SERVER['HTTP_PROFILE'])||isset($_SERVER['X-OperaMini-Features'])||isset($_SERVER['UA-pixels'])){
return true;
}
//build an array with the first four characters from the most common mobile user agents
$a=array('acs-','alav','alca','amoi','audi','aste','avan','benq','bird','blac','blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno','ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-','maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-','newt','noki','opwv','palm','pana','pant','pdxg','phil','play','pluc','port','prox','qtek','qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar','sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-','tosh','tsm-','upg1','upsi','vk-v','voda','w3c ','wap-','wapa','wapi','wapp','wapr','webc','winw','winw','xda','xda-');
//check if the first four characters of the current user agent are set as a key in the array
if(isset($a[substr($_SERVER['HTTP_USER_AGENT'],0,4)])){
return true;
}
}

function ipinrange($ip, $range1, $range2)
{
$ip=ip2long($ip);
$range1=ip2long($range1);
$range2=ip2long($range2);
return (($ip >= $range1) && ($ip <= $range2));
}

function flag($ip)
{
$result=mysql_query("SELECT * FROM network ORDER BY subone, subtwo");
while($ranges=mysql_fetch_array($result)){
if(ipinrange($ip, $ranges[1], $ranges[2])){
$flag="./flags/".str_replace(" ","",$ranges["country"]).".gif";
if(!is_file($flag))$flag="../flags/".str_replace(" ","",$ranges["country"]).".gif";
return "<img src=\"$flag\" alt=\"".$ranges["country"]."\"/>";
}
}
}

function network($ip,$type)
{
$result=mysql_query("SELECT * FROM network ORDER BY subone, subtwo");
while($ranges=mysql_fetch_array($result)){
if(ipinrange($ip, $ranges[1], $ranges[2])){
return $ranges[$type];
}
}
if(!$ranges["isp"]){
if($_SERVER["HTTP_X_UP_SUBNO"]){$subno=$_SERVER["HTTP_X_UP_SUBNO"];}
else{return gethostbyaddr($ip);}
if($subno==""){
$exp_ip=explode(",",$ip);
return gethostbyaddr($exp_ip[0]);
}
}
}

function network_test($ip)
{
$result=mysql_query("SELECT * FROM network ORDER BY subone, subtwo");
while($ranges=mysql_fetch_array($result)){
if(ipinrange($ip, $ranges[1], $ranges[2])){
return $ranges["isp"]." ".$ranges["country"];
}
}
if(!$ranges["isp"]){
return false;
}
}

function getuid_sid($sid)
{
$uid=mysql_fetch_array(mysql_query("SELECT uid FROM ses WHERE id=".sqlesc($sid).""));
$uid=$uid[0];
return $uid;
}

function getuid_nick($nick)
{
$uid=mysql_fetch_array(mysql_query("SELECT id FROM users WHERE username=".sqlesc($nick).""));
return $uid[0];
}

function getnick_sid($sid)
{
if($sid=="")return "guest";
$uid=mysql_fetch_array(mysql_query("SELECT uid FROM ses WHERE id=".sqlesc($sid).""));
$uid=$uid[0];
return getnick_uid($uid);
}

function getnick_uid($uid)
{
$unick=mysql_fetch_array(mysql_query("SELECT username FROM users WHERE id=".sqlesc($uid).""));
return $unick[0];
}

function points($uid)
{
$plus=mysql_fetch_array(mysql_query("SELECT points FROM profiles WHERE uid='".$uid."'"));
return $plus[0];
}

function shield($uid)
{
$not=mysql_fetch_array(mysql_query("SELECT shield FROM users WHERE id='".$uid."'"));
if($not[0]=='1'){ return true;}
else{return false;}
}

function shoutbanned($uid)
{
$del=mysql_query("DELETE FROM banned WHERE remaining<'".time()."'");
$not=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM banned WHERE uid='".$uid."' AND penalty='0'"));
if($not[0]>0){return true;}
else{return false;}
}

function banned($uid)
{
$del=mysql_query("DELETE FROM banned WHERE remaining<'".time()."'");
$not=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM banned WHERE uid='".$uid."' AND (penalty='3' OR penalty='4')"));
if($not[0]>0){return true;}
else{return false;}
}

function ipbanned($ipaddress,$browser)
{
$del=mysql_query("DELETE FROM banned WHERE remaining<'".time()."'");
$pinf=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM banned WHERE penalty='4' AND ipaddress='".$ipaddress."' AND browser='".$browser."'"));
if($pinf[0]>0){return true;}
return false;
}

function forumbanned($uid)
{
$del=mysql_query("DELETE FROM banned WHERE remaining<'".time()."'");
$not=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM banned WHERE uid='".$uid."' AND penalty='1'"));
if($not[0]>0){return true;}
else{return false;}
}

function chatbanned($uid)
{
$del=mysql_query("DELETE FROM banned WHERE remaining<'".time()."'");
$not=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM banned WHERE uid='".$uid."' AND penalty='2'"));
if($not[0]>0){return true;}
else{return false;}
}

function isuser($uid)
{
$cus=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM users WHERE id='".$uid."'"));
if($cus[0]>0)
{
return true;
}
return false;
}

function islogged($sid)
{
$deloldses=mysql_query("DELETE FROM ses WHERE expiretm<'".time()."'");
$sesx=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ses WHERE id='".$sid."'"));
if($sesx[0]>0)
{
if(!isuser(getuid_sid($sid)))
{
return false;
}
$xtm=time() + (60*getsxtm());
$extxtm=mysql_query("UPDATE ses SET expiretm='".$xtm."' WHERE id='".$sid."'");
return true;
}else{
return false;
}
}

function getage($strdate)
{
$dob=explode("-",$strdate);
if(count($dob)!=3){return 0;}
$y=$dob[0];
$m=$dob[1];
$d=$dob[2];
if(strlen($y)!=4){return 0;}
if(strlen($m)!=2){return 0;}
if(strlen($d)!=2){return 0;}
$y += 0;
$m += 0;
$d += 0;
if($y==0) return 0;
$rage=date("Y") - $y;
if(date("m")<$m){$rage-=1;}
else{
if((date("m")==$m)&&(date("d")<$d)){$rage-=1;}
}
return $rage;
}

function starsign($day,$month)
{
if(($month==1 && $day>20)||($month==2 && $day<20)){
$mysign = "Aquarius";
}
if(($month==2 && $day>18 )||($month==3 && $day<21)){
$mysign = "Pisces";
}
if(($month==3 && $day>20)||($month==4 && $day<21)){
$mysign = "Aries";
}
if(($month==4 && $day>20)||($month==5 && $day<22)){
$mysign = "Taurus";
}
if(($month==5 && $day>21)||($month==6 && $day<22)){
$mysign = "Gemini";
}
if(($month==6 && $day>21)||($month==7 && $day<24)){
$mysign = "Cancer";
}
if(($month==7 && $day>23)||($month==8 && $day<24)){
$mysign = "Leo";
}
if(($month==8 && $day>23)||($month==9 && $day<24)){
$mysign = "Virgo";
}
if(($month==9 && $day>23)||($month==10 && $day<24)){
$mysign = "Libra";
}
if(($month==10 && $day>23)||($month==11 && $day<23)){
$mysign = "Scorpio";
}
if(($month==11 && $day>22)||($month==12 && $day<23)){
$mysign = "Sagittarius";
}
if(($month==12 && $day>22)||($month==1 && $day<21)){
$mysign = "Capricorn";
}
return $mysign;
}

function rating($uid)
{
$info=mysql_fetch_array(mysql_query("SELECT * FROM profiles WHERE uid='".$uid."'"));
$forumm=$info["chatmsgs"];
$chatm=$info["forumposts"];
$shouts=$info["shouts"];
$quiz=$info["total_score"];
$points=$info["points"];
$tot=$forumm+$chatm+$shouts+$quiz+$points;
if($tot<10){return "<img src=\"../images/half-star.gif\" alt=\"\"/>";}
if($tot<25){return "<img src=\"../images/1-star.gif\" alt=\"\"/>";}
if($tot<50){return "<img src=\"../images/1half-star.gif\" alt=\"\"/>";}
if($tot<75){return "<img src=\"../images/2-star.gif\" alt=\"\"/>";}
if($tot<250){return "<img src=\"../images/2half-star.gif\" alt=\"\"/>";}
if($tot<500){return "<img src=\"../images/3-star.gif\" alt=\"\"/>";}
if($tot<750){return "<img src=\"../images/3half-star.gif\" alt=\"\"/>";}
if($tot<1000){return "<img src=\"../images/4-star.gif\" alt=\"\"/>";}
if($tot<1500){return "<img src=\"../images/4half-star.gif\" alt=\"\"/>";}
if($tot>=1500){return "<img src=\"../images/5-star.gif\" alt=\"\"/>";}
}

function ignored($uid,$tid,$get)
{
//0=can't ignore
//1=yes can ignore
//2=already ignored
if($uid==$tid){return 0;}
if(($get==1)&&(isowner($tid))){return 0;}
/*if(buds($tid,$uid)==2){return 0;}*/
$ign=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ignored WHERE tid='".$tid."' AND uid='".$uid."' OR tid='".$uid."' AND uid='".$tid."'"));
if($ign[0]>0){return 2;}
return 1;
}

function buds($uid,$tid)
{
//0=can bud
//1=request pended
//2=already buds
//3=can't bud
if($uid==$tid){return 3;}
$res=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buds WHERE ((uid='".$uid."' AND tid='".$tid."') OR (uid='".$tid."' AND tid='".$uid."')) AND agreed='1'"));
if($res[0]>0){return 2;}
$req=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buds WHERE ((uid='".$uid."' AND tid='".$tid."') OR (uid='".$tid."' AND tid='".$uid."')) AND agreed='0'"));
if($req[0]>0){return 1;}
$notb=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buds WHERE (uid='".$tid."' OR tid='".$tid."') AND agreed='1'"));
global $max_buds;
if($notb[0]>=$max_buds){return 3;}
$notb=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buds WHERE (uid='".$uid."' OR tid='".$uid."') AND agreed='1'"));
global $max_buds;
if($notb[0]>=$max_buds){return 3;}
return 0;
}

function status($uid,$type)
{
$info= mysql_fetch_array(mysql_query("SELECT a.regdate, a.level, b.points, a.browser, a.ipaddress, b.status FROM users a INNER JOIN profiles b ON a.id=b.uid WHERE a.id='".$uid."'"));
$days=explode(" days",time_msg((time()-$info[0]),1));
$sex=mysql_fetch_array(mysql_query("SELECT sex, image FROM profiles WHERE uid='".$uid."'"));
if($sex[0]=="M"){$usersex="<img src=\"../images/male.gif\" alt=\"(M)\"/>\n";}
if($sex[0]=="F"){$usersex="<img src=\"../images/female.gif\" alt=\"(F)\"/>\n";}
if($sex[1]!=""){$usersex=getbbcode($sex[1],$sid,1)."\n";}
$shoutbanned_logo="shoutbanned.gif";
if(mobile())$shoutbanned_logo="shoutbanned.gif&w=95";
$forumbanned_logo="forumbanned.gif";
if(mobile())$forumbanned_logo="forumbanned.gif&w=95";
$chatbanned_logo="chatbanned.gif";
if(mobile())$chatbanned_logo="chatbanned.gif&w=95";
$banned_logo="banned.gif";
if(mobile())$banned_logo="banned.gif&w=95";
$ipbanned_logo="ipbanned.gif";
if(mobile())$ipbanned_logo="ipbanned.gif&w=95";
$member_logo="member.gif";
if(mobile())$member_logo="member.gif&w=95";
$newmember_logo="newmember.gif";
if(mobile())$newmember_logo="newmember.gif&w=95";
$mod_logo="moderator.gif";
if(mobile())$mod_logo="moderator.gif&w=95";
$forumadmin_logo="forumadmin.gif";
if(mobile())$forumadmin_logo="training.gif&w=95";
$chatadmin_logo="chatadmin.gif";
if(mobile())$chatadmin_logo="med.gif&w=95";
$headadmin_logo="headadmin.gif";
if(mobile())$headadmin_logo="warden.gif&w=95";
$owner_logo="owner.gif";
if(mobile())$owner_logo="gov.gif&w=95";
if($type==1){
if(shoutbanned($uid)){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$shoutbanned_logo\" alt=\"(shoutbox banned!)\"/>";}
else if(forumbanned($uid)){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$forumbanned_logo\" alt=\"(forum banned!)\"/>";}
else if(chatbanned($uid)){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$chatbanned_logo\" alt=\"(chat banned!)\"/>";}
else if(banned($uid)){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$banned_logo\" alt=\"(banned!)\"/>";}
else if(ipbanned($info[4],$info[3])){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$ipbanned_logo\" alt=\"(Ip Banned!)\"/>";}
else if($info[5]!=""){return "($info[5])";}
else if($info[1]==5){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$owner_logo\" alt=\"(Owner!)\"/>";}
else if($info[1]==4){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$headadmin_logo\" alt=\"(Head Administrator!)\"/>";}
else if($info[1]==3){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$chatadmin_logo\" alt=\"(Chat Administrator!)\"/>";}
else if($info[1]==2){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$forumadmin_logo\" alt=\"(Forum Administrator!)\"/>";}
else if($info[1]==1){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$mod_logo\" alt=\"(Moderator!)\"/>";}
else if($days[0]<7){return "<img src=\"../phpThumb/phpThumb.php?src=../images/$newmember_logo\" alt=\"(New Member!)\"/>";}
else{return "<img src=\"../phpThumb/phpThumb.php?src=../images/$member_logo\" alt=\"(Member!)\"/>";}
}else{
if(shoutbanned($uid)){return "(Shoutbox Banned!)";}
else if(forumbanned($uid)){return "(Forum Banned!)";}
else if(chatbanned($uid)){return "(Chat Banned!)";}
else if(banned($uid)){return "(Banned!)";}
else if(ipbanned($info[4],$info[3])){return "($usersex Ip Banned!)";}
else if($info[5]!=""){return "($info[5])";}
else if($info[1]==5){return "($usersex Owner!)";}
else if($info[1]==4){return "($usersex Head Administrator!)";}
else if($info[1]==3){return "($usersex Chat Administrator!)";}
else if($info[1]==2){return "($usersex Forum Administrator!)";}
else if($info[1]==1){return "($usersex Moderator!)";}
else if($days[0]<7){return "($usersex New Member!)";}
else{return "$usersex Member";}
}
}

function automsgs($uid)
{
$getval=mysql_fetch_array(mysql_query("SELECT automsgs FROM users WHERE id='".$uid."'"));
if($getval[0]=='1'){return true;}
else{return false;}
}
?>

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

WhiteWarrior Principal · 1,419 posts #2

its not blocked :S dont look like it anyway

metulj Super moderator Principal · 1,726 posts #3

wrong file posted... LOL

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ノ刀ノイリ!

brand Senior · 391 posts #6

opticalpigion wrote: look into blocked.php

i looked in blocked.php and that is just to block a member and that is it and the blocked.php is when u block a ip and device on site that is

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

metulj Super moderator Principal · 1,726 posts #7

brand wrote: i looked in blocked.php and that is just to block a member and that is it and the blocked.php is when u block a ip and device on site that is

post blocked.php here

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ノ刀ノイリ!

opticalpigion Lead · 593 posts #8

brand wrote: i looked in blocked.php and that is just to block a member and that is it and the blocked.php is when u block a ip and device on site that is

the code u posted here is functions to detect users ip browsers and all. its nothing related to block.

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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