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, string Php compares string similarity
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
?