Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    May 2021
    Posts
    1
    Member #
    62771

    How can a beginner create a sports contest site?

    My friends like to play weekly pga tour golf contests and we currently pay for a website. I’m willing to put in the time and it doesn’t need to be pretty but is there a way to capture each golfer’s score on the pgatour leaderboard website and use that information on my website?

    We’d need each person to be able to create a username and password.
    They would need to each privately/secretly select golfers for the week.
    The golfers selected would be revealed to everyone once the event begins.
    And live scoring (based on pgatour leaderboard) would be shown on the website.

    Can anyone walk me though this process? Am I biting off more than I can chew? Thanks

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,963
    Member #
    5580
    Liked
    756 times
    The key to this is having a current and accurate leaderboard. If you can find a free pga API or pay for it, that would be best. An API is a way to query the pgatour database and get current/accurate data. If you can find an API let me know. You will then use PHP scripting on a website to grab and process the data. None of this can be done on a “free” host like weebly or wiz. You need a real webhost. Other scripting needed for member login and the database of all their ‘picks’. So it can be done.

    You might be tempted to use PHP to just “scrape” data from the pgatour webpage (the html), but I’m not sure if that data is live and if any page formats change, the scripts will no longer work.

    Private message me if you find an API you can use. Typically you provide a game ID of some kind and their API returns results in the form of a JSON file. A request every 5 minutes during a match might be enough to run your game. That all happens using PHP and javascripting.

    What are your technical skills?

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,963
    Member #
    5580
    Liked
    756 times
    I did some more research.

    pgatour.com no longer has a free API. I cannot find any API.

    Here is the place to get live information:
    https://sportsdata.io/pga-golf-api

    But it's not free and they don't display the costs, which makes me think it is expensive.

    So that explains why you are currently paying to use the contest website.
    They have to pay for live pga statistics.

    You cannot scrape the pgatour website because the data appearing is dynamically generated using javascripting and does not appear in the HTML source.

    So, the answer is: expect to pay (possibly a lot) of money to get live pga stats for your personal website / contest.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:38 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com