At 4/6/2007 06:01 AM, Sebe wrote:
i thought of an idea of counting the number of links to reduce comment spam.
I do this by counting the number of 'http://' instances in the
text. You can use a variety of PHP functions:
- substr_count()
- preg_match_all() then count() the result array
- st
[snip]
i thought of an idea of counting the number of links to reduce comment
spam.
unfortunately my methods is not reliable, i haven't tested it yet
though.. anyone have maybe a better solution using some regexp?
$links = array('http://', 'https://', 'www.');
$total_links = 0;
foreach($links a
On 4/6/07, Sebe <[EMAIL PROTECTED]> wrote:
i thought of an idea of counting the number of links to reduce comment spam.
unfortunately my methods is not reliable, i haven't tested it yet
though.. anyone have maybe a better solution using some regexp?
$links = array('http://', 'https://', 'www.')
3 matches
Mail list logo