Thanks all for the great info. On 12/13/05, Aaron Trevena <[EMAIL PROTECTED]> wrote: > On 13/12/05, Kieren Diment <[EMAIL PROTECTED]> wrote: > > On 13 Dec 2005, at 12:46, Peter Speltz wrote: > > > I'm using mod_perl. Basically I want to be able to set the $r->output > > > or a template variable to the output from another uri. Something like > > > this in the model: > > > > > > $r->output = wget 'https://secure.myoldsite.net/beer'; > > > > > > > I don't think there's a particular way to do it. One solution would be: > > > > For a start I'd use LWP::simple, or WWW::Mechanize for that kind of > > thing, depending on the complexity of your needs (i.e. either trivial > > or not trivial - wget is handy but probably not here). > > LWP::UserAgent is what I have used for this in the past and it does > the job very - the documentation will give you all you need. > > > Then I'd stash the output of either of those modules into somewhere > > in $r (probably in template_args), and then have a template that > > serves up the portion of $r to the user when they visit http:// > > my.host.name/app/external_data/ or wherever. > > *nod* > > > It would be easy to start caching things in your database - use the > > Net::Amazon example in Manual::Request (code in SVN docs is cleaner) > > as a starting base for this kind of thing. > > Yes - it could be worth checking the 'changed since' or whatever http > header and comparing it to the last one you fetched. Of course you > only want to do this if you have a relatively small set of pages you > will fetch and they don't change often -- otherwise it's not worth > wasting the space. > > cheers, > > A > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick > _______________________________________________ > Maypole-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/maypole-users >
-- pjs ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Maypole-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maypole-users
