Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using this code to send the mesaage through fullonsms...I am not getting any error but also not getting message. Plz help me out.

C#
public void send(string uid, string password, string message, string no)
        {
            try
            {
                HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=fullonsms");
                HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();

                System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
                string responseString = respStreamReader.ReadToEnd();

                switch (int.Parse(responseString))
                {
                    case -1: Response.Write("<script>alert('Server busy. Try again later.')</script>");
                        break;
                    case -2: Response.Write("<script>alert('Invalid Username or password')</script>");
                        break;
                    case -3: Response.Write("<script>alert('Invalid message text.')</script>");
                        break;
                    case -4: Response.Write("<script>alert('Failed to login Check username and password.')</script>");
                        break;
                    case -5: Response.Write("<script>alert('IP Blocked.')</script>");
                        break;
                }
                respStreamReader.Close();
                myResp.Close();
                lbl_error.Text = "send";

            }
            catch (ArgumentException e)
            {


            }
            catch (WebException e)
            {

            }

            catch (Exception er)
            {

            }
        }

        protected void imgbtn_send_Click(object sender, ImageClickEventArgs e)
        {


            send("9025654056", "nitish2274", Txtbox_msg.Text.ToString().Trim(), Txtbox_no.Text.ToString().Trim());
        }
Posted
Updated 26-Apr-13 23:48pm
v2
Comments
Sandeep Mewara 27-Apr-13 5:50am    
Does not debugging help or gave some insights?
sudeep.a 13-Nov-13 4:39am    
The remote server returned an error: (503) Server Unavailable
vinayakJJ 27-Apr-13 8:52am    
ubaid.tk is not working from past 15 days
doesent give any error but msg are not sent though

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900