URL Shortener Spam

蹲街弑〆低调 提交于 2019-12-04 16:09:36

You could also do something like http://www.untiny.me/ when a post is submitted. Basically, send an HTTP request and capture the "HTTP 301" response. You can then examine the URL you're being redirected to and deny/allow based on your policy.

For example:

C:\>wget -O NUL http://tiny.pl/htk
--2011-01-24 21:47:33--  http://tiny.pl/htk
Resolving tiny.pl... 79.96.141.187
Connecting to tiny.pl|79.96.141.187|:80... connected.
HTTP request sent, awaiting response... 301           <====
Location: http://www.google.com [following]           <====
--2011-01-24 21:47:34--  http://www.google.com/

Relevant lines marked by <====

Some form of CAPCHA might be a good idea. If you required registration prior to allowing a user to post, stick it in your registration form. Otherwise, maybe stick it wherever the user posts from as a requirement prior to accepting a post.

You could allow the shorteners that only point back to their own sites, like Twitter's or Github's. Another way is suggest your users to use http://9to.one , I developed the logic that will block spammer to shorten their link. You could try to shorten one of those link to test.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!