i have already configured SMS gateway & some php code.Now my project is thatone convert it to Csharp with minor changes,
probably i have to write new code.but so.. experienced guys from you i wanted to know is that possible ? Sample code below.
enter code here
$username = "abcdsoft";
$password = "softsoft";
//GET parametrar
//$source = $_GET['sourceaddr'];
//$dest = $_GET['destinationaddr'];
//$message_in = $_GET['message'];
enter code here
$source = $_GET['msisdn'];
$dest = $_GET['shortcode'];
$message_in = $_GET['msg'];
those are most top lines.below code i changed.(php to csharp)
enter code here
string username ='abcdsoft';
string password = 'abcdabcd';
int source = ['sourceaddr'];
int dest = ['shortcode'];
string message_in = ['msg'];
Is this way is correct ?
Almost.
Code should be like this:
string username = "abcdsoft";
string password = "abcdabcd";
int source = int.Parse(Request.QueryString["sourceaddr"]);
int dest = int.Parse(Request.QueryString["shortcode"]);
string message_in = int.Parse(Request.QueryString["msg"]);