Betlight is a betting market comparison site offering news, reviews and insight into sports markets as well as comparing the odds offered by all the main online bookmakers.
The site pulls together xml price feeds from up to 10 bookmakers, all of which are published in different formats. The first challenge was working out a way of parsing all of these feeds into a common structure where markets could be broken down into participants and compared within events. This is where the power of object oriented PHP really comes into its own: a single xml class deals with querying, saving and caching the xml while individual xml classes for each partner extend the class. This allows me to define how each of the partner xml classes behave, but implement slightly different parsing logic in each case.
The next problem is caching. Market data changes all the time, so it’s important that the site has accurate and up-to-date data. However the feeds can take a considerable amount of time to query so the caching had to be dependent on the market, the popularity of the feed and sport.
I created a custom management tool for the sportscards using JQuery, so administrators can add custom columns, rearrange participants and add in whichever live affiliates’ data they want.
Creating a strong SEO presence for the site was very important as the online betting market is extremely competitive. Enabling administrators to add custom meta tags to each market as well as creating canonical urls and avoiding duplicated content is a good start. Dynamic sitemaps and good copywriting and promotion is also key.