Users will find a way to pass on personal information.
If you can’t email: [email protected]
, someone will change until your rule fails: papa arroba charlie ponto com, papa(a)charlie dot com
... infinite possibilities.
I recommend an algorithm that looks for certain words, but does not stop the registration, just create an alert that there is a possible contact information for you to analyze.
An ER can find email or phone numbers, Skype or FB profile, Twitter, or any other social networking site.
You can create an array of (0, 1, 2, ... 9)
and an array of (zero, um, dois, ... nove)
and scroll through the text to find possible combinations between numbers and text.
I made a simple example, you can see in ideone.
function validate( $string )
{
// caracteres que serão encontrados em sequencia
$block[] = array(1,2,3,4,5,6,7,8,9,0);
$block[] = array('um','dois','tres','quatro','cinco','seis','sete','oito','nove','zero');
$block = array_merge( $block[0] , $block[1] );
// agrupa a sequencia encontrada
$sequencia = array();
$string = explode( ' ' , $string );
// procura a sequencia de 3 caracteres quee stiverem no `array block`
// palavra anterior + palavra atual + palavra seguinte formando uma sequencia de 3 caracteres
foreach( $string as $i => $palavra )
{
$match = array();
if( isset( $string[$i-1] ) )
$match[] = $string[$i-1];
$match[] = $string[$i];
if( isset( $string[$i+1] ) )
$match[] = $string[$i+1];
$possivel = array_intersect( $match , $block );
if( count( $possivel ) === 3 )
$sequencia[] = $possivel;
}
return $sequencia;
}
in this example below the output will be a multidimensional array with array('1' , 'dois' , '3' )
and array('quatro' , 'cinco' , 'zero' )
$sequencia = validate( "meu 1 dois 3 telefone ligue quatro cinco zero" );
if( count( $sequencia ) > 0 )
{
echo printr( 'possível sequência: ' );
echo printr( $sequencia );
}
else
{
echo printr( 'parece ok.' );
}
Note that the sequence will take into account the spelling. You can increment an ER together so that the spelling is not impediment. It is simple and server as base.
Maybe you do, but to block Skype user I believe not. Maybe you should have a moderator to monitor this.
– KaduAmaral
Set "Do not allow contact forms".
– Oralista de Sistemas
@Renan, what he means is not allow contact data, described there in the question
email, skype, facebook e telefone
– KaduAmaral
Don’t allow how? User can’t write in a text box? Can’t have in profile? Can’t mention in comment?
– Oralista de Sistemas