Explanation : https://haveibeenpwned.com/API/v3#PwnedPasswords
' . print_r( $result, TRUE) . ''; $hashfound = FALSE; foreach ($result as $key => $value) { $split = explode( ':', $value); //echo '
' . print_r( $split, TRUE ) . ''; if ( $prefix . $split[0] == $sha1hash ) { $result[$key] = '' . $value . ''; $hashfound = TRUE; } } $whatTextString = $textToHash <> '' ? '
Your Text «' . $textToHash . '» has ' . strlen($textToHash). ' characters.
' : '';
if ( $hashfound == FALSE )
{
echo '
' . $whatTextString . 'Hash ' . $sha1hash . ' not found.
'; } else { echo '' . $whatTextString . 'Hash ' . $sha1hash . ' found.
'; } echo '' . print_r( $result, TRUE) . ''; } ?>