Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/265.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# vb.net-如何从php url获取真正的链接_C#_Php_Vb.net - Fatal编程技术网

C# vb.net-如何从php 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 因为当

我有一个示例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