Simple function to avoid junk content in comments.
<?php | |
/* | |
* Return how much compression was applied to the comment. | |
*/ | |
function repetitive($comment){ | |
if(strlen($comment) / strlen(gzcompress($comment)) > 10) { | |
return true; | |
} | |
return false; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment