[Zope] how can I dynamically bring in external page

Phil Harris phil.harris@zope.co.uk
Mon, 28 Feb 2000 15:38:56 -0000


Andy,

Put this into an external method, it might give you a nudge in the right
direction:

import httplib

def getfilebyurl(self=None):
    h=httplib.HTTP('<host address>')
    h.putrequest('GET', '/index_html')
    h.putheader('Accept', 'text/html')
    h.putheader('Accept', 'text/plain')
    h.endheaders()
    errcode, errmsg, headers = h.getreply()
    print errcode # Should be 200
    f = h.getfile()
    data = f.read() # Get the raw HTML
    f.close()
    return data

HTH

As an aside, sort of just to let you know you aren't the only one using zope
in UK academia, give us a ring if you need anything else.

Phil
phil.harris@zope.co.uk
harrisp2@cf.ac.uk
tel: 01222 744156

----- Original Message -----
From: "Andy Heath" <a.k.heath@open.ac.uk>
To: <zope@zope.org>
Sent: Monday, February 28, 2000 12:01 AM
Subject: [Zope] how can I dynamically bring in external page


> What I want to do is have a page served by zope
> which is in fact on another non Zope server but
> to do this dynamically with dynamic pages,
> not just by pasting the html.
>
> The actual pages I want to bring in are HyperNews
> discussion pages.  Best of all would be able to
> serve a HyperNews discussion page as part of a
> table.
>
> All advice welcome.
>
> Andy
>
> --
> -------------------------------------------------
> Andy Heath                    a.k.heath@open.ac.uk
> The Open University           +44 (0) 114 2885738
>
>
> _______________________________________________
> 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 )
>