REST Examples

Below are examples for including South Lacrosse data into other web pages.

Please note: These examples are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

The recommended method to access our services is using Server Side Includes, such as the 3 PHP samples. If that isn't possible then there is an example of a Client Side Include which will work on any web page.

The PHP examples require the curl extension (this is usually compiled in, so if your site has PHP it is very unlikely not to have curl). They also use utilities in the httpCache.inc file, which contains code to cache data on your server, and enables cacheing in the browser, so providing fast response times.

The complete examples are also available as a zip file.

PHP league tables for all divisions using HTML dataSource codeSyntax highlighted sourceExample web page
PHP fixtures for a team using XML dataSource codeSyntax highlighted sourceExample web page
PHP Caching utilitiesSource codeSyntax highlighted source
Client Side Include tables into a web page (not recommended)Source codeExample web page