X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Jul 2013 07:15 AM by  anon
http vs. ftp file download
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:23
New Member


--
16 Jul 2013 07:15 AM
    Hello, I have two scripts to automatically download satellite imagery (Modis) via ftp. However, recently the provider changed from ftp to http and the scripts no longer work. There are some lines of code that specify ftp... oUrl->SetProperty, URL_SCHEME = 'ftp' and further down... dirList = oUrl->GetFtpDirList() Looking at the IDL Help for a solution, I find all kinds of relevant entries related to ftp download and find that the scripts are actually very similar to the Help examples, but there's no hint on how to change to http. If necessary I can post the scripts too, but if someone could point me in the right direction from my description, that'd be great. Thanks, Mike PS: The site to download files is e.g. http://e4ftl01.cr.usgs.gov/MOLA/MYD11...

    Deleted User



    New Member


    Posts:
    New Member


    --
    16 Jul 2013 02:55 PM
    Hi Mike, One of the following two options is what you need: 1 - http://www.exelisvis.com/docs/IDLnetU... Basically, you will need to use the IDLnetURL class to create the objets needed to get data from URL addresses. See that at the end there is a reference to an example code: Example Code: See idlneturl_widget.pro, located in the examples/doc/objects subdirectory of the IDL distribution, for the example code listing. View the file in an IDL editor window by entering .EDIT idlneturl_widget.pro. at the IDL Command Line. That code is to do ftp though, I belive. But in your case, what you will need to use is the HTTP functionality of the IDLnetURL class. See that that functionality allows you to "Issues Get requests to retrieve data from a remote HTTP server and place it in a buffer or file." 2- or, less recommended, could be to use the following example routine: http://www.exelisvis.com/Support/Help... I hope this helps. Cheers Fernando

    Deleted User



    New Member


    Posts:23
    New Member


    --
    17 Jul 2013 07:02 AM
    Hi Fernando, Thanks for your reply and tips. Yes, the scripts I have do use the IDLnetURL class to create the object, but trying to change oUrl-SetProperty, URL_SCHEME = 'ftp' to simply http doesn't work. The code example on the website you sent is ftp also. Looking at that code, there's lots of similar code as the one I have already. I'll do some more testing and see if I can get it to work. If not, would it be OK to send you the files, so you can check through them? They're not too long. Thanks, Mike

    Deleted User



    New Member


    Posts:
    New Member


    --
    17 Jul 2013 09:26 AM
    Hi Mike, Please, the best for you will be to send us an email to: support@exelisvis.com So that one of us in Tech Support will help you with your issues. Cheers Fernando
    You are not authorized to post a reply.