Reading/Parsing HTML Files from another server
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? MfG / best regards, Peer Dicken IMD GmbH Softwareentwicklung & Unternehmensberatung Edisonstr. 1 59199 Bönen Tel.: +49 23 83 - 9191-0 Fax.: +49 23 83 - 919191
On 28 Sep 2000, 16:01 Dicken, Peer wrote:
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).
See http://www.zope.org/Members/lstaffor/ZClientMethod "Using ZClient to Access Another Server" -- o ( Wolfgang.Strobl@gmd.de (+49 2241) 14-2394 /\ * GMD mbH #include _`\ `_<=== Schloss Birlinghoven, <std.disclaimer> __(_)/_(_)___.-._ 53754 Sankt Augustin, Germany ________________
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?
One method is documented at http://www.zope.org/Members/lstaffor/ZClientMethod. You can also use XML-RPC, but I don't know much about that. -- Loren ----- Original Message ----- From: "Dicken, Peer" <Peer.Dicken@imd-gruppe.de> To: <zope@zope.org> Sent: September 28, 2000 07:01 AM Subject: [Zope] Reading/Parsing HTML Files from another server
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?
MfG / best regards,
Peer Dicken
IMD GmbH Softwareentwicklung & Unternehmensberatung Edisonstr. 1 59199 Bönen
Tel.: +49 23 83 - 9191-0 Fax.: +49 23 83 - 919191
_______________________________________________ Zope maillist - Zope@zope.org 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 )
participants (4)
-
Dicken, Peer -
Loren Stafford -
seb -
Wolfgang Strobl