I wanted to provide my PHP site with SMS messaging functionality. For this task found a good example that showed how to add this functionality. It describes that there are two options, one is to use a database and the other is to use HTTP. For more details in case you are interested check out the followings: SMS Gateway - Developers Guide, PHP SMS API
Hope you will find it useful.