473,378 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

php readfile() function - how to implement on smarty web page

K.
Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.
Jun 2 '08 #1
6 3069
K. wrote:
Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with
their support community.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 2 '08 #2
K.

Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w wiadomosci
news:Ge******************************@comcast.com. ..
K. wrote:
>Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true)
?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.


Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with
their support community.
Unfortunately I did not ask on Smarty support forums.

M.
Jun 2 '08 #3
AD

Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w wiadomosci
news:Ge******************************@comcast.com. ..
K. wrote:
>Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.


Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with their
support community.

--
I have read on smarty forums

{php}

{/php}

M.

Jun 2 '08 #4
On May 20, 11:00 am, "K." <halinaciern...@poczta.onet.plwrote:
Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.
The quick and easy (and therefore evil) way of doing it would be to
escape into PHP in your templates. Smarty supports executing raw PHP
statements in templates but it's really not recommended. It'll do for
quickly prototyping a feature though.

http://www.smarty.net/manual/en/lang...nction.php.php

Your best bet is to write a Smarty plugin that will fetch the data you
want and present it to your script as a variable.

http://www.smarty.net/manual/en/plugins.php
http://www.smarty.net/manual/en/plugins.functions.php

The eightball example on the latter page should demonstrate pretty
much everything you need to know.
Jun 2 '08 #5
AD wrote:
>
Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w
wiadomosci news:Ge******************************@comcast.com. ..
>K. wrote:
>>Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile ('http://cw.money.pl/wiadomosci_banki.html',
true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model +
Smarty.

Is it possible to implement below code:

<?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.


Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with
their support community.

--

I have read on smarty forums

{php}

{/php}

M.
So - did you try ASKING in their forums?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 2 '08 #6
AD

Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w wiadomosci
news:P5******************************@comcast.com. ..
AD wrote:
>>
Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w wiadomosci
news:Ge******************************@comcast.com ...
>>K. wrote:
Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile ('http://cw.money.pl/wiadomosci_banki.html', true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with their
support community.

--

I have read on smarty forums

{php}

{/php}

M.

So - did you try ASKING in their forums?

--
No I found it on Polish smarty technology description

M.

Jun 2 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Brian | last post by:
Hello, I am trying to work out how to have smarty use a string's contents as the display-> template.. ie: $smarty->display($buffer); obviously $buffer isn't a filename, but a smarty template...
1
by: Sławomir Marcinkowski | last post by:
Hello, can someone show use example use smarty pager plugin? {pager rowcount=$LISTDATA.rowcount limit=$LISTDATA.limit txt_first=$L_MORE class_num="fl" class_numon="fl" class_text="fl"} I'm...
3
by: Phil Powell | last post by:
class DownloadGenerator { var $fullFilePath; function DownloadGenerator($fullFilePath) { $this->fullFilePath = $fullFilePath; } function &generateForceDownloadHeaders($fullFilePath = '')...
1
by: jpastora | last post by:
I'm trying to generate an array for a price selection box and i keep getting this error on the php page: "Parse error: parse error, expecting `'('' in /var/www/html/site/index.php on line 13" ...
1
by: Richard | last post by:
I need help. I have a smarty based program that I am modifying. I have a smarty template file that consists of smarty and HTML. I need to integrate some PHP database calls into it. My problem...
12
by: ORC | last post by:
Shouldn't 'ReadFile' block when timeouts are specified even when running in overlapped mode or am I wrong ??? Thanks Ole
2
by: Schorschi | last post by:
Can't seemd to get ReadFile API to work! Returns invalid handle error? =========================================================================== Ok, the visual basic gurus, help! The...
1
by: RuthC | last post by:
I am trying to pass a smarty array to a javascript function what is he easiest way to pass the values? I tried these code but not working. Please help me where i am wrong. <?php $url_names =...
15
by: Ketchup | last post by:
Hello everyone, I have been stuck with this problem for quite some time now. I am working in VB.NET, using framework 1.0. I have to keep the compatibility down to the original .NET framework...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.