6.11. get-url

Fetch a URL and return the contents.

6.11.1. Summary

    [get-url url]
    [get-url url="valid-url" strip=1*]

Positional parameters: The first line shows the usage with positional parameters (given in order). The second line shows usage with named parameters.

Parameters Description Default
url Must be a valid URL. Meaning, you have to supply the protocol. Example
    • http://demo.icdevgroup.org/
    • ftp://ftp.icdevgroup.org/
Attributes Default
strip none
Invalidates cache No
Macro No
Has end tag No

Tag expansion example:

    [get-url http://demo.icdevgroup.org/]
    [get-url url="http://demo.icdevgroup.org/" strip=1]

ASP-like Perl call:

    $Tag->get_url( { url => "http://demo.icdevgroup.org/", } );

    $Tag->get_url( { url => "http://demo.icdevgroup.org/",
                   strip => 1, } );

or similarly with positional parameters,

    $Tag->get_url( "http://demo.icdevgroup.org/" );

6.11.2. Description

Uses the LWP libraries (LWP::Simple) to fetch a URL and returns the contents. strip

If the strip option is set, strips everything up to <body> and everything after </body>. url

Must be a valid URL (including protocol).