|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
In this section, I will be talking about a very well known problem, Detecting Email addresses and web addresses in user's input. Spammers have been giving me a hard time for a long time, they come to your popular (High page rank) website, and they start submitting links to there websites, and sometimes hijacking the pages with there Javacript, Usually without having to enter any Javascript, they link to a Javascript file on there website. and then once my visitor opens that page, he or she is redirected to the spammer's website. With that in mind, we also do not want to stop people who want to post a link of value to our website, we want that link clickable but not the link the spammer posts. So, looks like there is a great deal of artificial intelligence incorporated, after all how can a computer tell bennine links from Spammer Links ?, One of the methodes we will see here teaches you how to strip spammers from there motive to spam your website. Another problem Would be Email addresses, On one of our popular entertainment websites, Children would come, and leave there Email address in comments on the page, Surely exposing themselves to all sorts of online risks. So, here are the mothodes to deal with both Links and Email addresses using PHPs regular expression engline.
This is one of the securist but most limiting methodes, Also note that we need to check for the HTML escape charracter counterpart of the H the T and the P (or the spammer can get a workaround to work for him)
|
|||||||||||||||||||||||||||||||||||
| XFREETUTORIALS.COM | ||||||||||||||||||||||||||||||||||||