Thursday, 19 April 2012

Web Services for Fun and Profit...

Web Services. They're all the rage, but what can they do for YOU? I wanted to be able to spam, I mean inform users with a message of the day type functionality. The idea is, when the user starts the game, they get a brief message displayed on the home page. I plan on using this to tell existing players of the test version when a new version is available. That way, they'll know when to go get the new version.

the first thing I needed, was a service that would host my web services. I chose 123 Reg . I use them to host my web site and they had a reasonable sounding monthly charge for the service. I know have a database with which to store the data and a PHP enabled web site. The trick now, was to learn me some PHP!

My starting point was the excellent tutorials by Ray Wenderlich and co here. This gives a run down of how to create a simple service to send out and cash in promo codes. I'm definitely going to be using that. It seems like a neat way to get around that annoying 50 user limit for sending out promo codes.

After a brief bit of dabbling, I was able to get my Message of the Day (MOTD) service up and running. It was actually a lot easier than I was expecting. The syntax of PHP should be legible to any Objective C programmer.

I could go crazy and implement a whole bunch of user tracking using web services, but there are a bunch of sites out there who do that already, so I'm planning on using their services, rather than my write my own.

So, web services - useful and not that hard!

No comments:

Post a Comment