RE: new snapshot - new fetch functionality
| From: | Monte Ohrt | Date: | Thu, 14 Mar 2002 03:03:13 +0000 |
| Subject: | RE: new snapshot - new fetch functionality | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3045@lists.php.net to get a copy of this message | ||
like what? strip out the links, or strip out the html tags?
Maybe that should be another function or modifier, so you can use it for
any text.
{fetch file=$url assign="contents"}
{$contents|extract_links}
{$contents|strip_html_tags}
Jimmy Harlindong wrote:
>
> Monte,
>
> This is great, and maybe you can also add the function to let us filter
> / extract certain parts of the fetched document too?
>
> Cheers
> Jimmy
>
> > -----Original Message-----
> > From: mohrt@ns3.ispi.net [mailto:mohrt@ns3.ispi.net] On
> > Behalf Of Monte Ohrt
> > Sent: Thursday, 14 March 2002 9:28 AM
> > To: smarty@lists.ispi.net
> > Subject: [smarty] new snapshot - new fetch functionality
> >
> >
> > A new snapshot is available Smarty-snapshot-20020313.tar.gz
> >
> > This one has {fetch} on steroids. These are only applicable to http
> > fetches.
> >
> > New possible parameters:
> >
> > file: (same as current)
> > assign: (same as current)
> >
> > user: authentication username (default none)
> > pass: authentication password (default none)
> > agent: change user agent (default Smarty Template Engine 2.0)
> > referer: set referer (default none)
> > timeout: set fetch timeout (default 30)
> > proxy_host: set proxy host (default none)
> > proxy_port: set proxy port (default none)
> > accept: change default accept string (even needed?)
> > header: send raw HTTP header (multiple allowed)
> > cluster_host: set cluster hostname (experimental, ask me if you're
> > curious)
> > assign_headers: template variable to assign array of returned headers
> >
> > If you don't want to grab the entire snapshot, I've attached the new
> > fetch plugin here.
> >
> > Let me know of any problems ;-)
> >
> > Monte
> >
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/