Nilan:
You can definitely use Web to lead. I wrote some code that captures a web to lead record, does a spam check and then uses cURL to post that data to web to lead. It's all in PHP. You only care about the posting to web to lead part.
See it at
arrowpointe - Google Code