Live Score

Discussion in 'PHP' started by baddot, Feb 3, 2007.

  1. #1
    does anyone knows how to caputre the html details of the other website like www.livescore.com ? meaning when i wana do automatic updates from livescore.com like matches and such?
     
    baddot, Feb 3, 2007 IP
  2. rays

    rays Active Member

    Messages:
    563
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    i hope this script will help you

    <?php
    $handle = @fopen("http://www.example.com", "r");
    if ($handle) {
    while (!feof($handle)) {
    $buffer = fgets($handle, 4096);
    echo $buffer;
    }
    fclose($handle);
    }
    ?>

    you may need to do further more processing on $buffer to extract the exact content you are looking for
     
    rays, Feb 5, 2007 IP
  3. aplus

    aplus Well-Known Member

    Messages:
    83
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    115
    #3
    Extracting the data will take some scripting. And you will still depend on livescores.com which sometimes is very slow or non responsive.
    There are online services that offer this kind of data. I can not remember the names, but I have read about it.
     
    aplus, Feb 6, 2007 IP
  4. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #4
    You can use regular expressions for data extraction.
    Look at the article "Regular expressions made easy", it has an example of data extraction from YouTube page.
     
    wmtips, Feb 6, 2007 IP
  5. baddot

    baddot Active Member

    Messages:
    309
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #5
    hi sorry for the late reply

    can i know whats it for

    4096 ? means ?

    <?php
    $handle = @fopen("http://www.example.com", "r");
    if ($handle) {
    while (!feof($handle)) {
    $buffer = fgets($handle, 4096);
    echo $buffer;
    }
    fclose($handle);
    }
    ?>
     
    baddot, Feb 8, 2007 IP
  6. aplus

    aplus Well-Known Member

    Messages:
    83
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    115
    #6
    It is the number of bytes to read from the remote location. You may need to increase this value.
     
    aplus, Feb 9, 2007 IP
  7. sriwirko

    sriwirko Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    fine for us too , one questions this one can i set refresh time ???
     
    sriwirko, Feb 9, 2007 IP
  8. baddot

    baddot Active Member

    Messages:
    309
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #8
    erm so i just have to put the file name ? eg. mylivescore.com/index.php from my checkscore.php ?
     
    baddot, Feb 20, 2007 IP
  9. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #9
    FYI If your planning on making your site big watch out.

    The premiership do not legally allow you to publish ANY fixtures or results without paying them a hefty sum, no matter where you got it from.

    Last year I think they went around sueing a few people.

    It shouldn't matter if your small time, but if you intend on getting big then you may as well pay them and get direct access
     
    m0nkeymafia, Feb 20, 2007 IP
  10. baddot

    baddot Active Member

    Messages:
    309
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #10
    pay them ? how to ? do you know where to go ?
     
    baddot, Mar 4, 2007 IP
  11. jezza chan

    jezza chan Active Member

    Messages:
    1,488
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    90
    #11
    Funny story, my friend is actually the marketing director for livescore.

    And yes dude, you will get your ass sued.
     
    jezza chan, Mar 4, 2007 IP
  12. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #12
    Im not sure where to pay them, but its a few hundred a year for a small site afaik.

    Just goto the premiership site and look around, there is a company that controls it but I completely forgot all the info I'm afraid.
     
    m0nkeymafia, Mar 20, 2007 IP
  13. baddot

    baddot Active Member

    Messages:
    309
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #13
    hmm you have any idea where to head out to ?
     
    baddot, Mar 24, 2007 IP
  14. reggy123

    reggy123 Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Hi,

    Soccerstand.com have just launched a Free livescore service so all webmasters and portals can implement a real-time livescore feature for free. You can also customize the CSS / style sheets to match the look and feel directly with your site!

    Check it out here - soccerstand dot com - right hand column get free livescore

    Best,

    reggy123
     
    reggy123, Nov 23, 2009 IP
  15. kaizersoze

    kaizersoze Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I recommend using www(dot)livescoreshop(dot)com. Here you can put together your own livescore package and decide how long you want to subscribe for. I find their feeds and general feel much more reliable than the other cheap livescore sites on the web which seem a little murky to me from both a business and technical point of view. A big plus is that Livescoreshop have secure credit card payments.
     
    kaizersoze, Mar 23, 2011 IP
  16. baddot

    baddot Active Member

    Messages:
    309
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #16
    which can i moneytise it ?
     
    baddot, Mar 29, 2011 IP
  17. CodeMaster1233

    CodeMaster1233 Well-Known Member

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    106
    #17
    There are other services such as livescores.com and they offer APIs so it will be a lot easier to get scores from API than the extraction.
     
    CodeMaster1233, Mar 30, 2011 IP