Jump to content

Regex spam prevention


jk11uk

Recommended Posts

Hi all

 

I have made a site where people can add text and then add tags. the tags go towards working out keyword density/relevance in the search engine for the site. So currently, someone could enter word, word, word, word, word in the tags field and rank number 1 for a search on 'word'. obviously not good

 

So im guessing i have to split up the user input by ',' (they are told to separate tags by commas) into an array and then remove any further matches of each array item (so 'word, word,' wouldn't be allowed byt 'word, another word' would). also i would need to stop people putting multiple repetitions of the word in each tag item (so word word word, next word, other other, etc)

 

only problem is i dont know how  >:(

 

can anyone please help?

Link to comment
https://forums.phpfreaks.com/topic/104815-regex-spam-prevention/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.