
static string fanhuiurl(string cahxunurl)
{
string url = "";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(cahxunurl);
req.Method = "HEAD";
req.AllowAutoRedirect = false;
HttpWebResponse myResp = (HttpWebResponse)req.GetResponse();
if (myResp.StatusCode == HttpStatusCode.Redirect)
{ url = myResp.GetResponseHeader("Location"); }
return url;
}