Israel

Israel

  • NA
  • 1.3k
  • 204.4k

Did youu already proove it? Its works really???

Apr 30 2014 10:17 AM
Hi!
 
I am making a little test in sending message from this code.
I am already registered in Clickatell site. I test from their site to send to my own cellnumber a message. Its works!
Then I am trying this code to make it real. But I didnt receive any sms. Let me inform that I had my modem on. Please if someone already test it from their site as I do and make success... Please I need your help.
 
 
private void button1_Click(object sender, EventArgs e)
{
WebClient client = new WebClient ();
// Add a user agent header in case the requested URI contains a
//query.
/*client.Headers.Add ("user-agent", "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.2; .NET CLR
1.0.3705;)");*/
client.QueryString.Add("user", "leader2000");
client.QueryString.Add("password", "AdTAVKBaENfbUR");
client.QueryString.Add("api_id", "leader2000");
client.QueryString.Add("to", "244924170969");
client.QueryString.Add("text", "Hi Israel, how are you? Are you in c-sharpcorner?");
string baseurl ="http://api.clickatell.com/http/sendmsg";
Stream data = client.OpenRead(baseurl);
StreamReader reader = new StreamReader (data);
string s = reader.ReadToEnd ();
data.Close ();
reader.Close ();
//return (s);
}
}
}

Answers (4)