1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Import xml feed into php script.

Discussion in 'PHP & Perl' started by oxonbeef, Nov 23, 2009.

  1. oxonbeef

    oxonbeef BANNED BANNED

    Joined:
    Jan 4, 2009
    Messages:
    2,242
    Likes Received:
    7,872
    How do I Import a live xml feed into a php script
    such as wordpress?
    I've been looking at "Magic Parser" or "Price tapestry"
    but at £50 and £200 a pop are there any other alternatives?
     
  2. kmoore

    kmoore Newbie

    Joined:
    Oct 6, 2009
    Messages:
    42
    Likes Received:
    2
    You can use cURL or fopen to grab the remote xml file.
    And you could use the php's xml function (simplexml etc.) to parse the grabbed data.
     
  3. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    SimpleXML is the way to go - nice and easy!!
     
  4. oxonbeef

    oxonbeef BANNED BANNED

    Joined:
    Jan 4, 2009
    Messages:
    2,242
    Likes Received:
    7,872
    Solved it here if it's any help to anyone.
    http://www.blackhatworld.com/blackhat-seo/commission-junction/142844-cjs-fusepump-xml-feed.html
    Thanks for your replies guys.
     
    Last edited: Dec 24, 2009