Showing posts with label SMS. Show all posts
Showing posts with label SMS. Show all posts

Sunday, December 3, 2006

Dhiraagu Web SMS widget using ASP VB.NET and AJAX






Yesterday, I didn’t have much work to do, so I decided to surf the net to find something interesting. And while I was reading some blogs at mvblogs.org I found a PHP script written by jaa, which sends web sms using the Dhiraagu’s web server. I don’t know much about PHP, but I wanted to write a similar script using ASP vbscript, the language that I have been using for the past 3 years. But due to the limitations in ASP vbscript I decided to move to ASP VB.NET to do the server-side scripting. (in classic ASP, http web request cannot be made without using a third-party component like AspHttp)


In ASP VB.NET, the methods were much simpler than I thought. But it took about 5 hours of non-stop programming to complete the server-side part. In general, what this script does is, it passes the login information to the perl-script hosted at dhiraagu server, and when the user is authenticated, the perl-script sets a cookie named “Dhi” which has a value like ‘0653233’. After grabbing the cookie value from that page, the second request is made to the “send_message.pl” to send the message.


I have also added some additional functionality to script, which will display the remaining SMS for the day and all validations are made on server-side. AJAX (Asynchronous Javascript And XML) is used to supply the form fields with required parameters. I will release the source code for the script after ‘beautifying’ and commenting the code blocks.