They are few solution for you as I am not sure which one is suitable for your server's environment so I just give u 2 of its.
1. Use a PC which is connected to a GSM modem or handphone with modem supported to capture the SMS via schedule preset as 1 min per checking then each time when your software received a SMS it auto submit to one of your webserver's cgi form.
2. Connect your webserver with a GSM modem and set a crontab as running a C program or perl script and capture the SMS and save to your httpd's folder or SQL database for your webserver to retrieve.