Using PHP/RSS Feeds on Miva Pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webdec
    Mini Mivite

    • Apr 2006
    • 14

    #1

    Using PHP/RSS Feeds on Miva Pages

    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?
  • Vic - WolfPaw Computers
    Banned

    • Mar 2006
    • 5866

    #2
    Originally posted by webdec
    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?
    You would have to use external pages, Empresa VM will not parse PHP.

    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.

    Comment

    • webdec
      Mini Mivite

      • Apr 2006
      • 14

      #3
      I've been seeing some things about the MvDO command being able to parse information. Is this an option?

      And is there any way to use miva commands in external pages to control the cat_tree, nav, header, footer?

      Comment

      • alexboyer
        Mivite

        • Mar 2006
        • 118

        #4
        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:
        Sorry, but the page you were looking for could not be found, or has moved location. Please use the search box or one of our navigation links above.


        Which I can then parse in PHP using this page:
        Sorry, but the page you were looking for could not be found, or has moved location. Please use the search box or one of our navigation links above.


        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:
        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>
        Which you can see working on this page:
        Sorry, but the page you were looking for could not be found, or has moved location. Please use the search box or one of our navigation links above.


        The javascript thing could also be placed inside Miva pages as seen working here:
        Sorry, but the page you were looking for could not be found, or has moved location. Please use the search box or one of our navigation links above.


        Or similarly, a headlines only version:
        Sorry, but the page you were looking for could not be found, or has moved location. Please use the search box or one of our navigation links above.
        Last edited by alexboyer; 04-13-06, 09:40 AM.
        Webmaster
        Hobby Products International______________
        hpi racing | hot bodies

        Comment

        Working...
        X