Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
FTP query
This thread has 6 replies. Displaying all posts.
Post 1 made on Friday February 13, 2009 at 11:59
Roti
Long Time Member
Joined:
Posts:
July 2008
104
Hi.

Is there a way to retrieve the contents of a text file on a FTP server using prontoscript? I would usually use AJAX/ActiveX to do it with Javascript from a web browser. I can connect and log into the FTP server from the pronto but can't figure out how to pull the contents of TXT files stored there.

I'm trying to create a weather module that pulls the latest text forecasts from the Australian Bureau of Meteorology, which are available free via anonymous FTP ([Link: ftp2.bom.gov.au]). Getting the forecast charts works fine, but I'd like to get the full text too.
Post 2 made on Friday February 13, 2009 at 12:57
GuerillaBuild
Long Time Member
Joined:
Posts:
December 2008
79
If the pronto can connect; then you should be able to send a text stream to the ftp. It sounds like you only need to format 'ftp commands' properly in a text string and send them to the ftp server to get this to work.

If the OZ weather service is like most other countries: Do they give out the weather via RSS feeds? If you're only looking for the highlights, RSS is pretty easy to parse over http and it might be quicker than diving into the ftp solution.
You can hide almost anything until you have to put the drywall up!
Post 3 made on Friday February 13, 2009 at 15:04
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Why not use the RSS feed [Link: weatherrss.com.au]. This is for Melbourne, but there are equivalent feeds for other cities, states, etc.

I developed a Bureau of Meteorology module. My wife then pointed out two things. First, Australian weather is very localised and, for example, the forecasts for one suburb in Melbourne can be very different from those for another. Second, the data from the Bureau is actually rather limited and does not, for example, include rain forecast, history listings, etc. I therefore now use data from the Weather Company which allows the suburb to be selected, includes rain forecasts, and has both daily (every 10 minutes) and monthly (every day) histories.
Post 4 made on Friday February 13, 2009 at 17:08
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,997
On February 13, 2009 at 11:59, Roti said...
Hi.

Is there a way to retrieve the contents of a text file
on a FTP server using prontoscript?

Yes, there is. You MUST implement the FTP protocol via TCP/IP socket as specified in the Requests For Comment (RFCs) for FTP (pls search google/yahoo). The exact protocol is dictated in, albeit not necessarily always human readable form, these specifications.

To download files (actually a buffer of file data), you exchange packets with the FTP server.

If such programming is beyond you, someone has, I believe, implemented an FTP client. I could be mistaken and they might have said Telnet.

You might want to try a SEARCH for last 2 or 4 years in this forum.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 5 made on Saturday February 14, 2009 at 06:34
brodricj
Long Time Member
Joined:
Posts:
May 2008
116
On February 13, 2009 at 15:04, Guy Palmer said...
I developed a Bureau of Meteorology module.

That would be pretty cool for us pronto learners to play with a BOM weather module in the pronto simulator, care to upload it to the files section?
OP | Post 6 made on Saturday February 14, 2009 at 10:23
Roti
Long Time Member
Joined:
Posts:
July 2008
104
Thanks for the info everyone.

Searching back for a few years (beyond the default 6 months) I found this thread where someone else was trying to do almost exactly the same thing a year ago !
[Link: remotecentral.com]

I was almost there, but "borrowed" brettd's more elegant parsing of the FTP passive mode response, and Voila !

Working version (not very pretty) here for anyone who wants to have a play -
[Link: rohansplace.com]

P.S.

GuerillaBuild - Thanks for the advice. Seems the official OZ RSS feeds are a bit brief, and XML is only available for some states (not Western Australia where I live).

Guy Palmer - Thanks for the info. I had not found the site before. Unfortunately little for Perth people :-(

Lyndel McGee - Thanks for the tip on where (& when) to search.

Also thanks to Jon Welfringer for fixing TCP/IP from the simulator - saves many hours!
Post 7 made on Saturday February 14, 2009 at 14:18
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,997
The search timeframe on this site has always been smaller, especially due to the number of posts in the Classic Pronto Forum. Extending the time to 1-2 years on this forum is my recommendation for ANY search.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse