从VB6下载没有文件名的URL [英] Download url from VB6 without the filename
问题描述
我有一个问题,就是通过VB6从URL下载文件。链接是这样的。所有的服务器都是类似的:
https://www.inforis.org/nuevo_ris/download_file.php?token=54cf5c32931c08ee9c03cd01ab5ea156&id=7394
我可以使用简单的Inet下载功能下载它,但无法获取de filename。服务器只给我这个文件的标题:
HTTP / 1.1 200 OK
日期:星期二,2013年1月15日19:14 :23 GMT
服务器:Apache / 2.2.16(Debian)
Last-Modified:Wed,09 Jan 2013 22:59:15 GMT
Etag:400ae-1bd39a-4d2e302e7d6c0
接受范围:字节
内容长度:1823642
保持活动:超时= 15,max = 99
连接:Keep-Alive
内容类型:application / pgp-signature
但没有名字,或者位置
有人可以帮助我吗?
谢谢
I have a problem for download a file from a URL, via VB6. The link is like this. All of the server, are similar:
https://www.inforis.org/nuevo_ris/download_file.php?token=54cf5c32931c08ee9c03cd01ab5ea156&id=7394
I can download it using simple Inet Download function, but can´t get de filename. The server gives me only this Headers of the file:
HTTP/1.1 200 OK
Date: Tue, 15 Jan 2013 19:14:23 GMT
Server: Apache/2.2.16 (Debian)
Last-Modified: Wed, 09 Jan 2013 22:59:15 GMT
Etag: "400ae-1bd39a-4d2e302e7d6c0"
Accept-Ranges: bytes
Content-Length: 1823642
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: application/pgp-signature
But no the name, or the Location
Can anyone help me, please?
Thanks
推荐答案
通过HTTP响应收到的URL和相关内容与任何特定文件名无关。通过HTTP协议在客户端获得的资源不必映射到任何文件系统。你可以使用你喜欢的任何有效文件名。
关于HTTP标题位置,请阅读:
http://en.wikipedia.org/wiki/HTTP_location [ ^ ],
< a href =http://tools.ietf.org/html/rfc2616> http://tools.ietf.org/html/rfc2616 [ ^ ]。
它可能存在也可能不存在。请参阅下面的评论。
-SA
The URL and related content you receive via HTTP response is not associated with any particular file name. The resources obtained on the client side via the HTTP protocol do not have to be mapped on any file system. You can use any valid file name you like.
As to the HTTP header "Location", please read:
http://en.wikipedia.org/wiki/HTTP_location[^],
http://tools.ietf.org/html/rfc2616[^].
It may or may not be there. Please see also my comments below.
—SA
这篇关于从VB6下载没有文件名的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!