C# vb.net-如何从php url获取真正的链接
我有一个示例URL(C# vb.net-如何从php url获取真正的链接,c#,php,vb.net,C#,Php,Vb.net,我有一个示例URL(http://www.techspot.com/downloads.php?action=download_now&id=2991&evp=113a02f49ca8ac11b566336b984b1655&file=1)。当我单击链接时,url将更改为: http://www.exisoftware.com/downloads/picture_finder/PictureFinderSetup.exe 谁能帮助我如何使用vb.net或c#将php链接转换为真实url 因为当
http://www.techspot.com/downloads.php?action=download_now&id=2991&evp=113a02f49ca8ac11b566336b984b1655&file=1
)。当我单击链接时,url将更改为:
http://www.exisoftware.com/downloads/picture_finder/PictureFinderSetup.exe
谁能帮助我如何使用vb.net或c#将php链接转换为真实url
因为当我使用HEAD方法在vb.net中制作一个程序来检查文件信息时,文件名不是“
PictureFinderSetup.exe
”而是“downloads.php
?action=download\u now&id=2991&evp=113a02f49ca8ac11b56336b984b1655&file=1”
如果不联系服务器,就无法完成。只有服务器知道确切的映射。
来自Fiddler:
请求
回应
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Fri, 27 Sep 2013 17:26:14 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Location: http://www.techspot.com/downloads/2991-extreme-picture-finder.html
要获取信息,可以使用WebBrowser
或HttpWebResponse获取所需数据
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Fri, 27 Sep 2013 17:26:14 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Location: http://www.techspot.com/downloads/2991-extreme-picture-finder.html