You could write a simple external method that uses httplib, e.g.

import httplib

def gethttp(self,url,file):
    h = httplib.HTTP(url)
    h.putrequest('GET', file)
    h.endheaders()
    errcode, errmsg, headers = h.getreply()
    if errcode == 200:
        f = h.getfile()
        response = f.read()
        f.close
    else:
        response = "oops."
    return response

and then:

<dtml-var "gethttp('www.zope.org','/')">

Seb.

> Hi,
> 
> I want to include a HTML file from another server (e.g.
> www.foo.com/include.html ) into the output of one of my DTML methods
> (index_html).
> 
> How can I do this?
>

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to