I would like to use an RSS feed in my Miva store. Would you recommend using an external php page or is there a way to use the php code within a Miva page?
Announcement
Collapse
No announcement yet.
Using PHP/RSS Feeds on Miva Pages
Collapse
X
-
You would have to use external pages, Empresa VM will not parse PHP.Originally posted by webdecI would like to use an RSS feed in my Miva store. Would you recommend using an external php page or is there a way to use the php code within a Miva page?
You could use an IFRAME, although all browsers do not support them...compatibility is better than it was years ago...but I'd favor a seperate PHP page.
-
You can parse the RSS with PHP and output the information in such a way that it can be written to any HTML page via javascript.
Example:
RSS feed:
http://www.hpiracing.com/rss/parts/new.rss
Which I can then parse in PHP using this page:
http://www.hpiracing.com/rssreader.p.../parts/new.rss
Since the source RSS feed is populated via the url, and since the page echos javascript writeln commands, you can use the entire url as the src for a <script> tag like this:
Which you can see working on this page:HTML Code:<script type="text/javascript" src="http://www.hpiracing.com/rssreader.php?headers=1&source=http%3A%2F%2Fwww.hpiracing.com%2Frss%2Fparts%2Fnew.rss"><!-- --></script>
http://www.hpiracing.com/rssdisplay.php
The javascript thing could also be placed inside Miva pages as seen working here:
http://www.hpiracing.com/mm5/merchan...en=RSS_NEWPROD
Or similarly, a headlines only version:
http://www.hpiracing.com/mm5/merchan...PROD_HEADLINESLast edited by alexboyer; 04-13-06, 09:40 AM.Webmaster
Hobby Products International______________
hpi racing | hot bodies
Comment
Comment