Browser

Started on the old forum in December 2007 · view the original in the archive · old links redirect here

7 replies · 777 views · started 18 years ago · 1 min read

4 participants
Guest #1

how can I forbid a browser from registering ? i have a stupid mother &%%#$$# who is bugging me with annoying nicks....I want to deny his browser from registering or even entering my lavalair chat...how can i do that ?

alesh Lead · 604 posts #2

how can I forbid a browser from registering ? i have a stupid mother &%%#$$# who is bugging me with annoying nicks....I want to deny his browser from registering or even entering my lavalair chat...how can i do that ?

4 start maybe IP ban??? lol

eeeeerrr....

crazybrumi Super moderator Principal · 1,064 posts #3

yeh i agree with you alesh ip ban is the best way as he/she can always jus kum in again.

<Limit GET HEAD POST>
order allow,deny
deny from 193.200
deny from anonymouse.org
allow from all
</LIMIT>

here i've baned the ip range of anonymouse and the website url

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

blackhowk Senior · 411 posts #4

**/CREATE TABLE browsers ( id int(11) NOT NULL auto_increment, agent varchar(220) default NULL, PRIMARY KEY (id), UNIQUE KEY agent (agent) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; /

<?php $link = mysql_connect("localhost", "root", ""); if(!$link) { echo "Nu ma pot conecta la serverul SQL" .mysql_error(); } $_SERVER["HTTP_USER_AGENT"]; $browser = $_SERVER['HTTP_USER_AGENT'];

$select_db = mysql_select_db('bann', $link);

if(!$select_db) { echo "nu ma pot conecta la baza de date" .mysql_error(); }

$insert = "INSERT INTO browsers (agent) VALUES ('$browser')"; @mysql_query($insert); $id = mysql_insert_id(); $id_for_delete = $id - 1; if($id%10 == 0) { $query = " DELETE FROM browsers WHERE id < '".$id_for_delete."' "; @mysql_query($query); // echo mysql_error(); }

$select_accept = " SELECT * FROM browsers WHERE agent LIKE '%Nokia6030/2.0 (y4.10) Profile/MIDP-2.0 Configuration/CLDC-1.1%' AND id = '".$id."' "; $result_accept = mysql_query($select_accept); if(mysql_num_rows($result_accept)) {

echo 'sometext';

} else { echo "some code";

}

mysql_close(); ?>

crazybrumi Super moderator Principal · 1,064 posts #5
//BLOCK this 1 his SAMSUNG-SGH-X700/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0. 
if(strstr($_SERVER['HTTP_USER_AGENT'], "this 1 his SAMSUNG-SGH-X700/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0"))
{
    die("Following recent high abuse of the system, your access has been blocked.");
}
 $sqlthing = mysql_query("SELECT * FROM phdetails WHERE banned='1'");
   $browser=(mysql_result($sqlthing,0,"browser"));
   $ip=(mysql_result($sqlthing,0,"ip"));
   $host=(mysql_result($sqlthing,0,"host"));
   $mimetypes=(mysql_result($sqlthing,0,"mimetypes"));
   $language=(mysql_result($sqlthing,0,"language"));
   $charset=(mysql_result($sqlthing,0,"charset"));

if(($browser=="$HTTP_USER_AGENT") && ($ip=="$REMOTE_ADDR") && ($host=="$hostsnames") && ($mimetypes=="$HTTP_ACCEPT") && ($language=="$HTTP_ACCEPT_LANGUAGE") && ($charset=="$HTTP_ACCEPT_CHARSET"))
{
echo "Your Device is banned";
}
else
{

hope this helps

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

Guest #6

**/*CREATE TABLE browsers ( id int(11) NOT NULL auto_increment, agent varchar(220) default NULL, PRIMARY KEY (id), UNIQUE KEY agent (agent) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; */

<?php $link = mysql_connect("localhost", "root", ""); if(!$link) { echo "Nu ma pot conecta la serverul SQL" .mysql_error(); } $_SERVER["HTTP_USER_AGENT"]; $browser = $_SERVER['HTTP_USER_AGENT'];** **$select_db = mysql_select_db('bann', $link);** **if(!$select_db) { echo "nu ma pot conecta la baza de date" .mysql_error(); }** **$insert = "INSERT INTO browsers (agent) VALUES ('$browser')"; @mysql_query($insert); $id = mysql_insert_id(); $id_for_delete = $id - 1; if($id%10 == 0) { $query = " DELETE FROM browsers WHERE id < '".$id_for_delete."' "; @mysql_query($query); // echo mysql_error(); }** **$select_accept = " SELECT * FROM `browsers` WHERE `agent` LIKE '%Nokia6030/2.0 (y4.10) Profile/MIDP-2.0 Configuration/CLDC-1.1%' AND id = '".$id."' "; $result_accept = mysql_query($select_accept); if(mysql_num_rows($result_accept)) {** **echo 'sometext';** **} else { echo "some code";** **}** **mysql_close(); ?>**

I think this one work's External image (may be gone) i've created x.php with the php code posted by blackhowk and i've added a link in index.php a link to x.php...when i access it it sais some code...what do i do next ? how do I stop a browser from accessing my chat ?

blackhowk Senior · 411 posts #7

make this file as bann.php

  1. include this page bann.php into chat.php or else (or put the code first on page)
  2. edit the bann.php or edit the code in browser zone with your nasty...browser

edit: {

echo 'sometext'; // or erase. die ();

} else { echo "some code"; // you dont have access here. die ();

}

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