• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.
    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Sports Ticker

invinciblebaby

New Coder
Hi there,

I am trying to develop a sports ticker to run on top of our website. I want it to pull scores from box lacrosse leagues (semi-pro). How hard would something like this be?
 

invinciblebaby

New Coder

Mutiny

Coder
Do they have an API where you could get the data in some common format like JSON? If they have an API you could probably do this pretty easily depending on the language you're using, but if they don't have an API it becomes more difficult as you have to parse / extract the data from another source like their website's HTML.
 

Mutiny

Coder
Usually if they have one publicly available it would be listed somewhere on the site. But these look like smaller sites that probably don't have APIs.

However, Wordpress does have an API available that may allow you to get some data, and at least that first site is running Wordpress. If you go to this url:


That should get you a list of all of the posts on that site.

Here's an article that talks about the Wordpress API: https://kinsta.com/blog/wordpress-rest-api/

A lot won't be available since you don't actually have access to the website, but it seems like things that are available on the site publicly may also be available via the API, so maybe you can find a place where the scores / stats are stored in the data. If you can, then you can use PHP to grab the JSON and parse it out and display it on your own website.
 
Top