In addition to cookies and IP restrictions, we can use the similar_text function of Php to determine the similarity of user posting content .????? Similar_text ()? Function compute the number of matching characters for two strings, or calculate the similarity between two strings in Php.
In addition to cookies and IP restrictions, we can use the similar_text function of PHP to determine the similarity of user posting content.
?
???? Similar_text ()? The function calculates the number of matching characters for two strings, or the similarity between the two strings (expressed in percentages ).???
?
Syntax
similar_text(string1,string2,percent)
Parameter description
String1 |
Required. Specifies the first string to be compared. |
String2 |
Required. Specifies the second string to be compared. |
Percent |
Optional. Specifies the name of the variable that stores the percentage similarity. |
?
?
Instance:
?
?
?
Combined with reality:
?
90){ $too_similar = $row['reserved']; print "The name you entered is too similar the reserved name "".$row['reserved']."""; break; } }?>
?
?
The source of the post: http://justcoding.iteye.com/blog/988504
?