We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36582
    • 463 Posts
    I’m trying to display the results of an advanced search for a lsiting in eBay, on my site by using RSS. This is pretty much the unknown for me and I’ve tried various snippets with no joy so far. The main thing I seem to be running up against is:

    "URL file-access is disabled in the server configuration"

    in the PHP error debug.

    Am I going about this all the wrong way? Is there a simple way to do this that I’m missing?

    Many thanks
      Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
      • 1574
      • 13 Posts
      Alot of web hosts disallow PHP from opening files located on other servers. I’m assuming the snippets you’re trying to use are trying to use the PHP fopen() function to read your RSS feed from Ebay. To get around this, hosts do let you use the cURL library to read remote files but it’s a little trickier to program for this.

      You might want to try the PieX Snippet - http://wiki.modxcms.com/index.php/PieX

      This snippet allows you to specify how the remote file is read so you could use either cURL or the fopen() option by passing the argument to the snippet call:

      [!pieX? &url=`http://www.ebay.co.uk/my_rss_feed.xml`&allow_url_fopne=`off`!]

      Take a read of the Wiki page, hopefully that snippet should help you out smiley
        • 36582
        • 463 Posts
        Many, Many thanks!

        On following the instructions carefully it worked an absolute treat.

        I’m now thinking of doing an advanced search to list only certain categories from a particular eBay store so I can reflect the store categories on my web site - do you think that will be possible?

        Is it possible to style the output?

        You’ve created a monster!

        Why couldn’t I find this snippet under Feeds?

        Thanks again

        Chris
          Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
          • 1574
          • 13 Posts
          I should think that if Ebay can create the feed, then you can do any kind of advanced search and import that!

          I’ve found that alot of snippets aren’t on the main modxcms.com site, so I always search the http://wiki.modxcms.com site as this tends to have more snippets that can be taken and adapted.

          I’ve not actually used PieX myself, but the Wiki suggests using the following variables being passed to the snippet to configure the output:

          - header
          - footer
          - item

          So you could create pass simple HTML into these variables to configure the output:

          header
          Set the chunk for header template. Default is the following: "<h2><a href="[+permalink+]" title="[+title+]">[+image_url+]</a></h2><ul>"

          footer
          Set the chunk for footer template. Default is the following: "</ul>"

          item
          Set the chunk for row template. Default is the following: "<li><a href="[+permalink+]" title="[+description+]">[+title+]</a>([+date+])[+category+]</li>"


          Might also be worthwhile using the cache options to make sure that you’re not slamming Ebay’s servers by requesting the feed hundreds of times an hour when your site takes off smiley
            • 36582
            • 463 Posts
            Thank you very much Andrew - I’ll give it a go.

            And sorry for asking more questions - I thought you were the author of the snippet.
              Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
              • 14050
              • 788 Posts
              Another snippet that is very versatile and allows very easy templating is called FeedX. It is not in the repository, but you can find it here:

              http://modxcms.com/forums/index.php/topic,12657.0.html
                Jesse R.
                Consider trying something new and extraordinary.
                Illinois Wine

                Have you considered donating to MODx lately?
                Donate now. Every contribution helps.