Internet Access
- Posted by David Cuny <dcuny at LANSET.COM> Jun 15, 2000
- 662 views
[Warning: This is as really a long-winded wish list disguised as a question] I've been reading (with some amount of envy) about the Rebol language (http://www.rebol.com). Stuff like web access, ftp and email all appear trivial in Rebol. Here's an example script that reads the raw contents of an html file and emails it: send luke at rebol.com read http://www.rebol.com/releases.html Rebol supports at the following, across various platforms: HTTP (web) SMPT (sending email) POP (reading email) FTP (file transfer) NNTP (news) It seems to me that it would be a Good Thing if Euphoria also supported these in a uniform, cross-platform manner. Some of this no doubt exists already, and I'm simply to dense to understand it. So I'm hoping that people can whack me with a clue stick and help me out here. I'm primarily interested in being able to read web pages. I was thinking of something along the lines of: read_http( <web address> ) that would return the contents a file from the web. The application I had in mind would read through a bulletin board and gather conversation threads for off-site viewing. [Question: If the page required cookies, would the routine have to accept cookies in order to work?] Anyhoo, I took a look at Daniel Bernstein's EuFTP package, but that deals with FTP, not HTTP. [Taking a stroll into Wish List Land...] For completeness, we also need: read_ftp() read_binary_ftp() write_ftp() write_binary_ftp() And since Rebol provides an interface to email, of course I want Euphoria to provide that as well. Stealing shamelessly, I was thinking of something like: open_mailbox() -- open a mailbox for reading clear_mailbox() -- empty a mailbox write_mailbox() -- send a message to a mailbox read_mailbox() -- read the current message in the mailbox remove_mailbox() -- remove item from mailbox next_mailbox() -- read the next message in the mailbox close_mailbox() -- close a mailbox I took a brief look at the email demo that Robert includes with Euphoria. Is there a special reason why the message goes to my Outbox, instead of being send immediately? Where can I get more information on this protocol? [End of Soap Box/Wish List] If someone could point me in the right direction for writing a read_http() function, I'd appreciate it. Additionally, I'm wondering if there actually is any interest in putting together a cross-platform library of Rebol-like web functions for Euphoria. -- David Cuny