I am trying to send an sms from my website.
Below is the HTTP api which works perfectly.It sends the msg and returns the string
http://sms.mywebsite.com/api/sendmsg.php?user=MYID&pass=MYPASS&sender=SENDERID&phone=1234567980&text=Test Message&priority=ndnd&stype=normal
But i want to use it in C#.Accept mobile number from TextBox1 and Message from TextBox2
WebRequest webRequest = WebRequest.Create("http://sms.mywebsite.com/api/sendmsg.php?user=MYID&pass=MYPASS&sender=SENDERID&phone=" + TextBox1.Text + "&text=" + TextBox2.Text+ "&priority=ndnd&stype=normal")
The first statement is executing if i paste the http code directly in the website and i recieve the smsin my mobile .But the WebRequest statement dosent send the sms
TextBox1.Text=123456789;//some mobile number
TextBox2.Text="Thankyou for registering @ MyWEBSITE. A verification email has been sent to Your email";