I Need A Very Urgent Help And Need It Badly

Started on the old forum in October 2008 · view the original in the archive · old links redirect here

41 replies · 1,826 views · started 18 years ago · 1 min read

TL;DR · summary of 41 replies
  • - The code approach to ban a user with their nick and IP/Browser combo is not provided in the thread as it concluded that adding such functionality would require custom coding work which was deemed too time-consuming by...
  • - A simple file named blocked.php was suggested for banning users based on browser strings, but no full script or code examples were given.
  • - The use of a single banned.txt file to store banned details was proposed as an alternative method, though it did not include how to save data in combo format like nokia 6630 | 123.456.789.65.
  • - No solution or code for banning users based on nick and IP/Browser combination was provided in the thread.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

6 participants
bijaybd Developer · 178 posts #22

i am trying to learn it so i need help bro i am trying my level best but my site is getting to hard to control for fllooding so i need some help so that i can learn also can improve the security of my site

if it is needed i will give some bux for the work cz i know its really hard to work for free but i really need help thats why i am making all those post

also i am searching for this thing from last 3 months and i tried by my self a lot but i can not do anything thats why i am asking for so many helps

chris Junior · 39 posts #23

We have given you multiple ways to do it, yes we know you want a nice system coded onto the script so you don't have to manually add but that is what i would personally call custom coding and you could get it done at cost at any freelancer site.

I wrote about 80% of that chat script and don't even use it anymore so i simply will not spend hours coding add-ons each time someone asks.

If i ever get back into the script again its the first thing i will do, until then your on your own unless you wish to pay someone or learn yourself.

I spent days and days reading php.net and other sites when i first started, i suggest you also do the same.

djdeny Junior · 12 posts #24

QUOTE (rukiya @ Oct 14 2008, 07:07 PM) <{POST_SNAPBACK}>

its not good to use cookie, users can clear cookie by themselves,only you can ban them using ip and browser

if you delete your cookies, then made it back to homepage 😀

rukiya Lead · 569 posts #26

QUOTE (bijaybd @ Oct 14 2008, 07:10 PM) <{POST_SNAPBACK}>

i am trying to learn it so i need help bro i am trying my level best but my site is getting to hard to control for fllooding so i need some help so that i can learn also can improve the security of my site

if it is needed i will give some bux for the work cz i know its really hard to work for free but i really need help thats why i am making all those post

also i am searching for this thing from last 3 months and i tried by my self a lot but i can not do anything thats why i am asking for so many helps

post codes regarding to ip,browser,nick,ban

i will do for you

bijaybd Developer · 178 posts #27

sorry i didn't understand what codes which i codes i have to give you

bijaybd Developer · 178 posts #29

rukiya please tell me what should i do ???

chris Junior · 39 posts #31

There are no codes relating to it, he is asking for a totally new function...

It would be best to have an "ip/browser ban" link shown only to admin (like the ip link) on the users profile page within the chat as the browser and ip variables are passed already to this page. Then linking to another file with a function to add the ip::browser (you could work this out from the existing admin tools, but make sure to check the user against the admin list or anyone will be able to do it..)..

You could add a manual function but you would have to type the browser and ip names so its pointless really.

Then run a check on all pages you want just like it checks if names are banned, but check for the ip::browser instead. You would need to first make the two variables in the same format as the file ie:

$var = $ip.'::'.$browser;

Well thats the theory behind it anyway..

bijaybd Developer · 178 posts #32

is the code should be like this -

$var = $ip.'::'.$browser; $var = file('../text/bban.txt'); $rukiya = explode(" ",$_SERVER['HTTP_USER_AGENT']); if($REMOTE_ADDR=="$ip" AND $rukiya[0]=="$browser"){ header ('Location: http://yourdomain.com/ban.php');}

brother recently i found this one -

function detect_mobile_device(){
  
  // 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;
  }
  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;
  }
  if(stristr($_SERVER['HTTP_ACCEPT'],'text/vnd.wap.wml')||stristr($_SERVER['HTTP_ACCEPT'],'application/vnd.wap.xhtml+xml')){
    return true;
  }
  if(isset($_SERVER['HTTP_X_WAP_PROFILE'])||isset($_SERVER['HTTP_PROFILE'])||isset($_SERVER['X-OperaMini-Features'])||isset($_SERVER['UA-pixels'])){
    return true;
  }
  $a = array(
                    'acs-'=>'acs-',
                    'alav'=>'alav',
                    'alca'=>'alca',
                    'amoi'=>'amoi',
                    'audi'=>'audi',
                    'aste'=>'aste',
                    'avan'=>'avan',
                    'benq'=>'benq',
                    'bird'=>'bird',
                    'blac'=>'blac',
                    'blaz'=>'blaz',
                    'brew'=>'brew',
                    'cell'=>'cell',
                    'cldc'=>'cldc',
                    'cmd-'=>'cmd-',
                    'dang'=>'dang',
                    'doco'=>'doco',
                    'eric'=>'eric',
                    'hipt'=>'hipt',
                    'inno'=>'inno',
                    'ipaq'=>'ipaq',
                    'java'=>'java',
                    'jigs'=>'jigs',
                    'kddi'=>'kddi',
                    'keji'=>'keji',
                    'leno'=>'leno',
                    'lg-c'=>'lg-c',
                    'lg-d'=>'lg-d',
                    'lg-g'=>'lg-g',
                    'lge-'=>'lge-',
                    'maui'=>'maui',
                    'maxo'=>'maxo',
                    'midp'=>'midp',
                    'mits'=>'mits',
                    'mmef'=>'mmef',
                    'mobi'=>'mobi',
                    'mot-'=>'mot-',
                    'moto'=>'moto',
                    'mwbp'=>'mwbp',
                    'nec-'=>'nec-',
                    'newt'=>'newt',
                    'noki'=>'noki',
                    'opwv'=>'opwv',
                    'palm'=>'palm',
                    'pana'=>'pana',
                    'pant'=>'pant',
                    'pdxg'=>'pdxg',
                    'phil'=>'phil',
                    'play'=>'play',
                    'pluc'=>'pluc',
                    'port'=>'port',
                    'prox'=>'prox',
                    'qtek'=>'qtek',
                    'qwap'=>'qwap',
                    'sage'=>'sage',
                    'sams'=>'sams',
                    'sany'=>'sany',
                    'sch-'=>'sch-',
                    'sec-'=>'sec-',
                    'send'=>'send',
                    'seri'=>'seri',
                    'sgh-'=>'sgh-',
                    'shar'=>'shar',
                    'sie-'=>'sie-',
                    'siem'=>'siem',
                    'smal'=>'smal',
                    'smar'=>'smar',
                    'sony'=>'sony',
                    'sph-'=>'sph-',
                    'symb'=>'symb',
                    't-mo'=>'t-mo',
                    'teli'=>'teli',
                    'tim-'=>'tim-',
                    'tosh'=>'tosh',
                    'treo'=>'treo',
                    'tsm-'=>'tsm-',
                    'upg1'=>'upg1',
                    'upsi'=>'upsi',
                    'vk-v'=>'vk-v',
                    'voda'=>'voda',
                    'wap-'=>'wap-',
                    'wapa'=>'wapa',
                    'wapi'=>'wapi',
                    'wapp'=>'wapp',
                    'wapr'=>'wapr',
                    'webc'=>'webc',
                    'winw'=>'winw',
                    'winw'=>'winw',
                    'xda-'=>'xda-'
                  );
  if(isset($a[substr($_SERVER['HTTP_USER_AGENT'],0,4)])){
    return true;
  }
}

function detect_iphone(){
  if(eregi('iphone',$_SERVER['HTTP_USER_AGENT'])||eregi('ipod',$_SERVER['HTTP_USER_AGENT'])){
    return true;
  }
}

if(detect_mobile_device()){
  header('Location: [url="http://yourdomain.com/'%3b%29;"]http://yourdomain.com/');[/url]
  exit;
}

?>
chris Junior · 39 posts #33

I explained above, i am not repeating myself any more, i have already taken probably more time trying to explain it than it would of taken to code already.

You have opened similar topics on this site and mine, its getting boring now. Use the info and idea we have given you, i am not going to code this for you.

bijaybd Developer · 178 posts #34

ok i have done the coding but getting a problem also can get the browser and ip from browser.txt and ip.txt but the problem is if i use $phone it shows = phone but do not show operamini or the version number so that the flooder can enter the site also i banned opera but i doesn't work with operamini version

if i put explode(" ",$_SERVER['HTTP_USER_AGENT'] it shows only array anyone can help me

bijaybd Developer · 178 posts #36

gum slone bro not working getting this error :

1: <?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 2: "http://www.wapforum.org/DTD/wml_1.2.xml">Array 3: ( 4: [0] => Opera/9.52 5: [1] => (Windows 6: [2] => NT 7: [3] => 5.1; 8: [4] => U; 9: [5] => en) 10: ) 11: <wml><card title="Pm mahia"> User: mahia On: MOT-W375 Ip: 119.30.45.17 Browser: Array Rank:

Still the browser showing : array

GumSlone Administrator Principal · 1,690 posts #37

it depends on which array you want to show, a gave you an example wich gives you the array number and the and its result.

$arr=explode(" ",$_SERVER['HTTP_USER_AGENT']);
print_r($arr); //Shows all arrays
echo $arr[0]; //shows only1 array number 0
echo $arr[1]; //shows only1 array number 1

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

bijaybd Developer · 178 posts #38

i tried this but not working :

$update = "`ua` = '".htmlspecialchars(getenv('HTTP_USER_AGENT')).";");
$ua = $update['ua'];

if($admin=="1" OR $admin=="2" OR $admin=="3"){echo "[UserAgent]: ".$ua."
";}

but not working error showing in the 1st line

bijaybd Developer · 178 posts #40

like user can see the [useragent] with version name etc etc of the browser right now it only show opera and the mobile model but it doesn't show the mobile version or operamini version etc etc

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