comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » idlneturl question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: idlneturl question [message #90476 is a reply to message #90474] Wed, 04 March 2015 03:45 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
I have not found a way to look at file information using IDLnetURL without downloading the file first. With IDLnetURL, you have to perform a Get, then look at the response header. Below is an example of how to get the response header.


IDL> oURL = IDLnetURL()
% Loaded DLM: URL.
IDL> info = oURL -> Get(URL=' ftp://spdf.gsfc.nasa.gov/pub/data/omni/omni_cdaweb/hro_5min/ 1981/omni_hro_5min_19811201_v01.cdf')
IDL> oURL -> GetProperty, RESPONSE_HEADER=rh
IDL> print, rh
220-WARNING! This is a U.S. Government Computer
This U.S. Government computer is for authorized users only.
By accessing this system, you are consenting to complete monitoring with no expectation of privacy.
Unauthorized access or use may subject you to disciplinary action and criminal prosecution.
220 Welcome to our FTP Server
331 Anonymous login ok, send your complete email address as your password
230 Anonymous access granted, restrictions apply
257 "/" is the current directory
250 CWD command successful
250 CWD command successful
250 CWD command successful
250 CWD command successful
250 CWD command successful
250 CWD command successful
200 EPRT command successful
200 Type set to I
213 2128388
150 Opening BINARY mode data connection for omni_hro_5min_19811201_v01.cdf (2128388 bytes)
226 Transfer complete


Well, that was interesting...

Apparently NASA will not give you a meaningful response header. This is how I normally do it, though. There should be a "Last-Modified" field that you can look for to parse the information you want.


IDL> file = oURL -> Get(URL=' http://emfisis.physics.uiowa.edu/Flight/RBSP-A/L3/2013/02/02 /rbsp-a_magnetometer_4sec-geo_emfisis-L3_20130202_v1.3.2.cdf')
IDL> ourl -> GetProperty, RESPONSE_HEADER=rh
IDL> print, rh
HTTP/1.1 200 OK
Date: Wed, 04 Mar 2015 11:44:03 GMT
Server: Apache/2.2.22 (Ubuntu)
Last-Modified: Thu, 29 Jan 2015 21:26:19 GMT
ETag: "53c077a-f7fa2-50dd123904e55"
Accept-Ranges: bytes
Content-Length: 1015714
Content-Type: application/x-cdf
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: X Windows display
Next Topic: SPAWN error question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:52:53 PDT 2025

Total time taken to generate the page: 0.00373 seconds