cómo enviar sms usando way2sms y fullonsms en asp.net

programación


HOLA
cómo enviar sms usando way2sms y fullonsms en asp.net

Solución 4

Solución 6

Solución 1

Pruebe el siguiente código para way2sms.

C#
protected void Page_Load(object sender, EventArgs e)
{
    List<string> nos = new List<string>();
    nos.Add("9320xxxxxx");
    nos.Add("9940xxxxxx");
    nos.Add("9789xxxxx");
    foreach (string no in nos)
    {
        send("9840xxxxxx", "xxx", "Sending sms", no);
    }
}
 
public void send(string uid, string password, string message, string no)
{
    HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=way2sms");
    HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
    System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
    string responseString = respStreamReader.ReadToEnd();
    respStreamReader.Close();
    myResp.Close();
}

Solución 5

este código arroja un error como “Se produjo una excepción de tipo ‘System.Net.WebException’ en System.dll pero no se manejó en el código de usuario

Información adicional: El servidor remoto devolvió un error: (403) Prohibido.

Por favor, ayúdame….

コメント

タイトルとURLをコピーしました