开发者

Filter URLs of websites with adult content

开发者 https://www.devze.com 2023-03-21 09:49 出处:网络
What I was trying to do was have users type in their favorite sites in a form and submit it onto their profile

What I was trying to do was have users type in their favorite sites in a form and submit it onto their profile

What I wanted to ban was pornographic sites, but since there are most likely thousands of those sites out there, what is the best way of banning them?

My first option was using javascript like this one

var bad_sites_arr=new Array("bad.com","adult.com");

but if I did this, I would have to type every single site and put them in quotes separated by a space and comma. This would be tedious and very time-consuming but also very effective.

My question was, is there another way of bann开发者_运维问答ing adult sites?


 is there another way of banning adult sites?

You might want to implement a simple "Report this link" type of moderation. That way, you have the users themselves policing other users. You only need to get involved if a link is reported.

You could even have a link automatically removed if it is reported by 3 or more people.


You could subscribe to a filtering service, require moderation of unknown sites, or just give up and ban folks who wind up abusing it. Whatever you do, JavaScript isn't the way to do it, as that's under control of the user.


http://akismet.com/

Akismet filters out your comment and track-back spam for you, so you can focus on more important things.

This will try to filter out all spam instead of just porn. You can make this even stronger by having user first having to pass captcha. If you don't like this you could reputation in stead just like stackoverflow.com does. To have reputation in place you first need to authenticate users(I suggest OpenID).

P.S: banning all spam is almost impossible(reputation will get you a long way I think). You could moderate posts which look flakky first, but then you probably also will have some false positive or some porn links will get trough probably.

0

精彩评论

暂无评论...
验证码 换一张
取 消