Friday 15 June 2012

php - How to get the similarity between two strings? -


I want to create a function that will warn a user if there is a very cruel force attempt on an account. The function will warn the user if there is more than 75% string match. I have done this:

  function passwordmatch ($ string, $ stora_password) {$ New_String = str_split ($ string); $ New_Stored_Password = str_split ($ Stored_Password); $ Match = 0; Forex Currency ($ New_String AS $ Value) {if (in_array ($ Value, $ New_Stored_Password)) {$ Match ++; }} $ Match return; } $ String = "test"; $ Pass = "test"; Echo password match ($ string, $ pass);   

This returns 4 returns, but there is clearly a flaw in my code that I can not understand a solution It would be great to be convinced

< Div class = "post-text" itemprop = "text">

You should not place it in the first place.

Brute force should stop attacks by applying hourly / daily limit on unsuccessful attempts. How does the user care how hackers were close to guessing the password?

In addition to this, more importantly, you should not pass the password of the user in clear text in the first place

To store the password properly See these questions for some deeper discussion about:



No comments:

Post a Comment