且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

URL缩短垃圾邮件

更新时间:2023-11-26 20:30:52

您也可以做类似 HTTP:// WWW当后提交.untiny.me / 。基本上,发送一个HTTP请求,并捕获HTTP 301响应。然后,您可以检查你正在被重定向到URL和拒绝/允许根据您的策略。

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.

例如:

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/

标记由相关行&LT; ====