[Zope] include from an external server

Bakhtiar A Hamid kedai@kedai.com.my
Tue, 19 Nov 2002 14:20:59 +0800


On Tuesday 19 November 2002 12:21, Paul Winkler wrote:
> On Mon, Nov 18, 2002 at 08:58:40PM -0500, lee doolan wrote:
> > extreme newbie here...
> >
> > I have a need to insert a small snippet of html from an external serv=
er.=20
> > I used to do this in php like this:
> >
> > (include "http://server.com/request?param=3Darg+string"")
> >
> > can someone tell me how to do this using ZPT?
>
> There's no built-in equivalent.
> You need a method that fetches the data, then
> you can include like anything else, e.g.
>
> <span tal:content=3D"here/some_method_that_fetches_stuff">
>   remote stuff here
> </span>
>
>
> THe method can be either an external method you
> write yourself (i've done this using python's
> httplib library), or try KebasData
> (google for it).=20

KebasData is at www.zope.org/Members/kedai/KebasData

there's also a how to use kebasdata, that's recently updated.  will soon =
add=20
ways to use KebasData from PT


>I haven't tried it yet,
> but KebasData looks quite nice, as you
> can grab particular bits of other pages,
> as long as you can come up with the right
> regular expression (and as long as the
> remote site doesn't change enough to break
> your regexp.)
>
> --PW

--=20

=09http://www.kedai.com.my/             http://www.kedai.com.my/eZine
=09http://www.zope.org/Members/kedai    http://www.my-zope.org
=09Get the Tables!