title: replacement for php file_get_contents in smarty template?
body: <p>I need to use PHP <code>file_get_contents()</code> in smarty tpl file. I can't use it in PHP and assign it to smarty template. Because the URL is generated dynamically through loop inside smarty template file. So I'm using smarty plugin function to achieve that task. But I want to know whether is there any way I can use it in template file directly instead of parsing it from plugin file.</p>
  
  <p>I've attached the plugin code which I'm using to achieve this function. Please anyone let me know how to use it in smarty tpl file directly.</p>
  
  <pre><code>function smarty_function_getTitle($params)
  {
  if ($params['id']) {
      $content = file_get_contents("http://youtube.com/get_video_info?video_id=".$params['id']);
      parse_str($content, $ytarr);
      return $ytarr['title'];
  }
  }
  </code></pre>
  
  <p>I've used below code to call it in smarty template:</p>
  
  <pre><code>{getTitle id=$videoId}
  </code></pre>
  
  <p>Suggestions are welcome!</p>