Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

This document applies to Jamroom 3 only!
For current Jamroom 4 Documentation, visit the main Jamroom Documentation section.

{jr_feed_reader} Index {jr_flash_player}

{jr_fetch}


{jr_fetch} is a special Template function that is used for "including" data from another website (or the local website), by acting as web browser and then allowing you to embed the "fetched" data directly into a Jamroom Template.  {jr_fetch} is unique in that will still operate even if the PHP setting "allow_url_fopen" is set to "no".

Parameters:

Name Type Required Default Description
file string yes n/a The "file" parameter tells Jamroom what URL you want to include in your template.
assign string no no The "assign" parameter is an optional parameter that allows you to take the "fetched" URL and store it in a template variable for further processing.  This is handy to check to ensure the results of the fetch contain valid data.


Example:

Example using {jr_fetch} to grab the output of an Ad Server located on your server and include it in a Jamroom Template:

{jr_fetch file="http://yoursite.com/adserver/showad?id=random" assign="ad_variable"}
{* now the variable $ad_variable contains the output of the URL - we can check to be sure we didn't have errors *}
{if !strstr($ad_variable,'error')}
{$ad_variable}
{/if}

{jr_feed_reader} page 144 of 185 {jr_flash_player}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2024 The Jamroom Network