]*?>(.*)<\/body[^>]*?(.*)>/i'; $replacement = '$2'; return preg_replace($pattern, $replacement, $in); } function smarty_cms_function_fetchurl($params, &$smarty) { global $gCms; if( isset( $params["url"] ) ) { $url = $params["url"]; if( $url[0] == '/' ) { $config = $gCms->config; $url = $config["root_url"].$url; } return _fetchURL( $url ); } } function smarty_cms_help_function_fetchurl() { ?>

What does this do?

Fetches the contents of a url.... simple as that.

How do I use it?

Just insert the tag into your template/page like: {fetchfurl url="http://checkip.dyndns.org"}

What parameters does it take?

Advanced arguments can be connected on the url as well, take a look at: {fetchurl url="/cgi-bin/muln.cgi?a=1&b=99"}

Author: Robert Campbell <rob@techcom.dyndns.org>

Version: 1.0

Change History:
Initial revision