Horse Racing Data Feeds
RacingStats247.com is the data provider in our examples below. It offers different data implementations like iframe widgets & white labels or RSS feeds, but in this article we will focus on showing you how to include RSS data in your website content in a way that both offers useful updated content in your pages and also adds value to your SEO work as the content will be seen as originating from your own website.
Below RSS implementations require some simple PHP codes implementations, therefore in order for the code to be run in your website, the pages should be either .php or, in the case of .html / .htm file, you will have to tell your server to run PHP code in such files using a simple command in your .htaccess file.
Race Results/Fixtures per Racecourse
To show the latest race results/upcoming fixtures from individual racecourses you can use the following code:
Race Results for Racecourse
$html = “”;
$url = “http://www.racingstats247.com/RacecourseFeedRssWidget.aspx?langId=1&tournamentId=130902&option=1”;
$xml = simplexml_load_file($url);
foreach($xml->channel->item as $item)
{$html .= $item->description;$html .= “<hr />”;}
echo $html;
?></div>
Implementation:
Above code will show the results for Aintree Racecourse England. To implement the widget-code, simply copy the above code in your webpage html source code where you want the data to be shown
- Visit RacingStats247 Widgets page, go to the Widget Code Generator section and select the country, following a selection of the racetrack you are interested in to get the latest results
- Copy the code provided on widget-code generation and paste it within your webpage source code where you wish the latest race results to appear
- Make sure the page is set to run the PHP code implemented. Upload the page on your web hosting account. Check racing widgets page from WidgetLab for more info such as some hosting requirements and implementation options for other platforms like WordPress or Joomla
- Recommended to list the source of the data provided by including on your website a link to RacingStats247.com