Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Getting variables from remote server

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Volcane
Smarty n00b


Joined: 18 Aug 2003
Posts: 2

PostPosted: Mon Aug 18, 2003 7:23 pm    Post subject: Getting variables from remote server Reply with quote

hello,

I want to include variables from a remote http server. I could open it in php, parse it and then assign to variables.

What I thought would be kewl is to have the remote server output valid smary template and then use include to include that into my current template. The remote template would have some {assign var="name".....} statements.

Is this possible?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Aug 18, 2003 8:31 pm    Post subject: Reply with quote

if you really want this, write a "simple" resource plugin that does it (the timestamp-part is a nice task). see: http://smarty.php.net/manual/en/templates.from.elsewhere.php.

but be sure that the source you get your template-data from is a trusted one and that you employed a few countermeasures ( http://smarty.php.net/manual/en/variable.security.php ) when things go wrong.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Volcane
Smarty n00b


Joined: 18 Aug 2003
Posts: 2

PostPosted: Mon Aug 18, 2003 8:38 pm    Post subject: Reply with quote

hello,

Thanks for your reply, the source is a box i maintain it has access to a DB there and I want it to output many variables for me. So thats kewl.

Thanks I will check out the resource things.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP