Return to CLIP Main Page
Next: Accessing WWW/Internet: Example
Up: Document: pillow_sl_imperial
Previous: A Phones Database
- The HTTP, FTP, etc. protocols are ASCII protocols which can be added
relatively easily to any system (provided it has a socket interface or
equivalent).
- Applications: search tools, content analyzers, reading html templates,
etc. Also access to remote modules via WWW:
:- use_module('http://www.xx.y/prolog/p.pl')
- E.g., PiLLoW protocol support:
- fetch_url((URL), Request,Response) -
- Some (Request) options:
- head: only interested in the header.
- timeout(Time): specifies number of seconds for
timeout (fails).
- if_modified_since(Date)
- authorization(Scheme,Param)
- Some possible elements of (Response):
- content((Content)): document as a list of characters.
- status((Type),(Code),(Phrase)).
- last_modified((Date)).
- expires((Date)).
- location((URL)) (document has moved).
- url_info((URL), Info): parses a URL.
- Example:
?:- url_info('http://www.xx/foo.html',UI), fetch_url(UI,[],R),
member(content(C),R), html2terms(R,Terms).
<herme@fi.upm.es>-< webmaster@clip.dia.fi.upm.es>
Last updated on Mon Mar 31 20:49:44 MET DST 1997