How to block words?

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

4 replies · 605 views · started 16 years ago · 1 min read

4 participants
manavworld Developer · 118 posts #1

How to block some words at register page? I dont want sm user register with any site name, example: google.com, how i can block these words at registration page? I want code for indifun script

morency Senior · 488 posts #4
///function
	function check($string){
	$words = array(
					//	'banned words/links blaaaa',
						'google.ro',
						'yahoo.ro'
					);

		foreach ($words as $word) {
			if (strstr($string, $word)) {
				return true;
			}
		}
		return false;

	}

////////USAGE :

$string='bla googdro 2';

	if(check($string)){

	echo"you cant use such words ";

	}
	else {
	echo"ok?!";}

Unamos los corazones,hoy todos somos multicolores!

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