this is my sendmsg coding page. Am i right? its not working. First i got fatal error: call undefined function curl_init(). i cleared that error. now it takes time to load 10 to 15 seconds and show error in that page. coding is below...
$name = $_POST['name'];
$connum = $_POST['connum'];
$email = $_POST['email'];
$msg = $_POST['msg'];
$msg = "$name $connum $email";
$from = "FROM";
$to = "9876543210";
$username = "xxx";
$password = "yyy";
$hash = "RjK=H4kL";
$formcountry = "91";
$sourceinfo = "1";
$url = "http://absolutesms.com/Sendsms.aspx";
$fields = array ( 'from'=>urlencode($from), 'to'=>urlencode($to), 'username'=>urlencode($username), 'password'=>urlencode($password), 'hash'=>urlencode($hash), 'formcountry'=>($formcountry), 'sourceinfo'=>($sourceinfo) );
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
$result = curl_exec($ch);
if(!$result)
{
echo "Error";
}
else
{
echo "Message Sent Successfully";
}
curl_close($ch);