QUOTE (djdeny @ Oct 14 2008, 06:02 PM) <{POST_SNAPBACK}>
it is best to send cookie, so that the user does not know :)
its not good to use cookie, users can clear cookie by themselves,only you can ban them using ip and browser
Started on the old forum in October 2008 · view the original in the archive · old links redirect here
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
QUOTE (djdeny @ Oct 14 2008, 06:02 PM) <{POST_SNAPBACK}>
it is best to send cookie, so that the user does not know :)
its not good to use cookie, users can clear cookie by themselves,only you can ban them using ip and browser
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
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.
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 😀
If anyone is wondering what script we are talking about its this one: http://www.hotscripts.com/Detailed/70444.html
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
QUOTE (bijaybd @ Oct 14 2008, 07:45 PM) <{POST_SNAPBACK}>
sorry i didn't understand what codes which i codes i have to give you
poor you
QUOTE (bijaybd @ Oct 14 2008, 07:59 PM) <{POST_SNAPBACK}>
rukiya please tell me what should i do ???
learn php to find out what codes are necessary to be posted here to get help
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..
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;
}
?>
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.
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
$arr=explode(" ",$_SERVER['HTTP_USER_AGENT']);
print_r($arr);
Advertise your mobile site for FREE with AdTwirl
gum slone bro not working getting this error :
Still the browser showing : array
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
What is this? What do you wanna say here? QUOTE
$update = "
ua= '".htmlspecialchars(getenv('HTTP_USER_AGENT')).";");
Where did you get arrays so that you are taking a perticular array form $update? QUOTE
$ua = $update['ua'];
And whats the meaning of using htmlspecialchars() in ua?