dj-kenpo Posted June 13, 2007 Share Posted June 13, 2007 would anyone be able to think of a way to count how many http links are inside a string variable? I'm getting spam to my sites and it's a constant uphill battle, constaly blocking keywords etc, it seems more logical to simply block emails that send me more than 3 links via my form. the only time someone sends me 3 links it's random bullshit spam with nonsense words and links. perhaps this method of blocking would work for others on their comment systems or mails forms as well... thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/55460-count-number-of-links-inside-a-string-variable/ Share on other sites More sharing options...
Psycho Posted June 13, 2007 Share Posted June 13, 2007 preg_match_all(); or explode() based upon "http" and check the count of the output. Quote Link to comment https://forums.phpfreaks.com/topic/55460-count-number-of-links-inside-a-string-variable/#findComment-274099 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.