Results 1 to 10 of 10
  1. #1
    BetCHL is offline New Member
    Join Date
    November 2015
    Location
    Canada
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with XML Feeds

    Hi guys,

    So my affiliate gave me access to the XML odds feeds and I can't seem to get it to work on Go Daddy website builder. I copy pasted all the code from the link into the HTML box on go daddy. What am I missing? The code starts with:

    <root date="2015-11-04T15:05:00Z" now="2015-11-04T15:06:33Z" type="PREMATCH"

    Should I put anything before that? Go daddy told me I was doing it right, my affiliate manager told me my website guy should know how to do it but he doesn't so I'm feeling hopeless. Hopefully this is an easy fix because I feel like it really adds credibility to my website.

    Thanks for any help!

  2. #2
    dfiocch's Avatar
    dfiocch is offline Private Member
    Join Date
    September 2006
    Posts
    877
    Thanks
    789
    Thanked 567 Times in 350 Posts

    Default

    Mmm... you need a sort of XML feeds reader to parse it then "write" data into html pages.
    Or you can handwrite your own with some PHP.

  3. #3
    BetCHL is offline New Member
    Join Date
    November 2015
    Location
    Canada
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by dfiocch View Post
    Mmm... you need a sort of XML feeds reader to parse it then "write" data into html pages.
    Or you can handwrite your own with some PHP.

    No one could tell me that before? I'm really not familiar with this stuff and a quick google search gave me a headache more than anything so I might skip this option if I can't find a feeds reader that works on go daddy. Not looking to write my own code.



    Also, looking at the code, it looks exactly like HTML code so I don't see why it needs to be converted to something else.
    Last edited by BetCHL; 4 November 2015 at 12:09 pm.

  4. #4
    dfiocch's Avatar
    dfiocch is offline Private Member
    Join Date
    September 2006
    Posts
    877
    Thanks
    789
    Thanked 567 Times in 350 Posts

    Default

    Looks like XML to me, not HTML.
    So, you need a parser. You told that it's a odds feed (xml), right? It's a "live" feed?
    If you simply "copy&paste" the code from the source (in this case the XML file), you will have always the same results, same dates, same types printed on the page where you pasted the code.

    Again, you need a parser that read the source every "tot" time (maybe every 5 seconds or 1 hour or whatever you want), parse the data and print it on the html page (or store data istelf into a database).

    Sorry... what you copied into your pages?
    If you want, just post a little bit more code. I will try to help

  5. #5
    BetCHL is offline New Member
    Join Date
    November 2015
    Location
    Canada
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It just goes on and on like this:

    <root date="2015-11-05T12:06:46Z" now="2015-11-05T12:07:42Z" type="PREMATCH" site="removed due to post count">
    <sport code="ICE_HOCKEY" name="Ice Hockey">
    <groups>
    <group treeId="386850" name="Ice Hockey. VHL">
    <events>
    <event treeId="3597436" name="Sputnik vs Neftyanik Almetievsk" date="2015-11-07T12:00:00Z" eventId="3190241">
    <note/>
    <liveEventId/>
    <url>


    </url>removed due to post count


    <members>
    <member id="101341" name="Sputnik" role="Team" selkey="HOME"/>
    <member id="104343" name="Neftyanik Almetievsk" role="Team" selkey="AWAY"/>

    </members>


    <markets>
    <market model="MTCH_HB" name="To Win Match With Handicap" type="HANDICAP" main="false">
    <sel name="Sputnik(+1)" coeff="1.41" coeffId="7022433749" selkey="H" uid="" value="+1"/>
    <sel name="Neftyanik Almetievsk(-1)" coeff="2.91" coeffId="7022433766" selkey="A" uid="" value="-1"/>

    </market>


    <market model="MTCH_HB" name="To Win Match With Handicap" type="HANDICAP" main="false">
    <sel name="Neftyanik Almetievsk(-2)" coeff="5.10" coeffId="7022433772" selkey="A" uid="" value="-2"/>
    <sel name="Sputnik(+2)" coeff="1.17" coeffId="7022433773" selkey="H" uid="" value="+2"/>

    </market>


    <market model="MTCH_HB" name="To Win Match With Handicap" type="HANDICAP" main="true">
    <sel name="Sputnik(+1.5)" coeff="1.35" coeffId="7022433775" selkey="H" uid="" value="+1.5"/>
    <sel name="Neftyanik Almetievsk(-1.5)" coeff="3.44" coeffId="7022433762" selkey="A" uid="" value="-1.5"/>

    </market>


    <market model="MTCH_T1TTLG" name="Total Goals (Sputnik)" value="2.5" type="TOTAL" main="false">
    <sel name="Under 2.5" coeff="1.74" coeffId="7022433769" selkey="U" uid=""/>
    <sel name="Over 2.5" coeff="2.09" coeffId="7022433702" selkey="O" uid=""/>

    </market>

  6. #6
    dfiocch's Avatar
    dfiocch is offline Private Member
    Join Date
    September 2006
    Posts
    877
    Thanks
    789
    Thanked 567 Times in 350 Posts

    Default

    Yes, it's XML.
    Just some few things... what data you need to be read and "pasted" online (example, I see "date","type","name"... etc...)
    Is this snipped copied from the source file?
    Do you have some skills with PHP and/or Javascript?

  7. #7
    BetCHL is offline New Member
    Join Date
    November 2015
    Location
    Canada
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    They sent me a link that's only readable from my IP address. I copy pasted all of that from that link. The page is a very long one with a bunch of code looking just like this.


    I have absolutely no PHP/Javascript skill.

  8. #8
    JackTenSuited is offline Private Member
    Join Date
    March 2004
    Posts
    1,014
    Thanks
    23
    Thanked 334 Times in 207 Posts

    Default

    Quote Originally Posted by BetCHL View Post
    They sent me a link that's only readable from my IP address. I copy pasted all of that from that link. The page is a very long one with a bunch of code looking just like this.


    I have absolutely no PHP/Javascript skill.
    You will need to hire someone then. Think of the XML feed as a database of odds or data, you need away or parsing that data to display on a page, you can't just copy and paste it otherwise you are posting the raw data.
    You need a PHP script which takes that data and presents it to the visitors (not particularly easy to do properly)

  9. #9
    dfiocch's Avatar
    dfiocch is offline Private Member
    Join Date
    September 2006
    Posts
    877
    Thanks
    789
    Thanked 567 Times in 350 Posts

    Default

    Quote Originally Posted by BetCHL View Post
    They sent me a link that's only readable from my IP address. I copy pasted all of that from that link. The page is a very long one with a bunch of code looking just like this.


    I have absolutely no PHP/Javascript skill.
    Ok. Absolutely you need a parser.
    I can write some lines of code but I need time (I have to take care about my site).

    Just thinking: you can parse the data from the source, store it in array then present it to visitors (PHP).

    I will see

  10. #10
    universal4's Avatar
    universal4 is offline Forum Administrator
    Join Date
    July 2003
    Location
    Courage is being scared to death...and saddling up anyway. John Wayne
    Posts
    32,830
    Thanks
    4,076
    Thanked 8,884 Times in 5,680 Posts

    Default

    I recall helping someone write a script a few years back that would parse an xml file with jackpot information and then write it to an html page. It was a pain to get formatting the way we wanted but once that was conquered it worked pretty good.

    I dug around and could not find the original source files, but if I find them I will update this thread.

    Does anyone have any experience with this plugin?
    https://wordpress.org/plugins/wp-all-import/

    Rick
    Universal4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •