block pc allow m0bile

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

2 replies · 608 views · started 16 years ago · 1 min read

3 participants
shakil420 Developer · 125 posts #1

I use wapdesire script and i use block.php to prevent pc user . .but when i block opera then it blocks all opera agents and even all opera mini. ! I want to only block pc opera mozilla python spider browsers not m0bile based operamini m0zilla browsers how to do@ any wapmaster specially riderz, s0mething else, mgigs and khanbd,,,

Shifty Junior · 33 posts #2

some monthes ago i wrote this fking (yea, it is bad coding style) script. if u know php then edit it and use 😉

<?php
header('Content-Type: text/html;charset=utf-8');
$ua=$_SERVER['HTTP_USER_AGENT'];
if ((substr($ua,0,5)=='Opera' and !strpos($ua,'Mini')) or substr($ua,0,7)=='Mozilla' or substr($ua,0,6)=='Galaxy' or substr($ua,0,12)=='AmigaVoyager' or substr($ua,0,8)=='CyberDog' or substr($ua,0,5)=='Dillo' or substr($ua,0,7)=='HotJava' or substr($ua,0,15)=='IBM WebExplorer' or substr($ua,0,4)=='iCab' or substr($ua,0,10)=='LeechCraft' or substr($ua,0,5)=='Links' or substr($ua,0,4)=='Lynx' or substr ($ua,0,11)=='NCSA Mosaic' or substr($ua,0,7)=='NCSA Mosaic' or substr ($ua,0,6)=='retawq' or substr ($ua,0,6)=='Webkit' or substr ($ua,0,4)=='Uzbl' or substr ($ua,0,3)=='w3m' or substr($ua,0,12)=='WorldWideweb'){
echo 'it is comp';
}
else
{
echo 'it is mobile';
}
?>

p.s.: but it works 😀

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