File: /var/www/selfanalyse/wp-content/plugins/psychometrics/api/sendsmsapi.php
<?php
class Sendsms {
public function sendMessage($senderId, $mobile, $encodedMessage){
global $wpdb;
$Msgid = '20200545';
$Msgpwd = '99FUL999';
$service_url = 'http://164.52.195.161/API/SendMsg.aspx?uname='.$Msgid.'&pass='.$Msgpwd.'&send='.$senderId.'&dest='.$mobile.'&msg='.$encodedMessage;
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$curl_response = curl_exec($curl);
if ($curl_response === false) {
$info = curl_getinfo($curl);
curl_close($curl);
die('error occured during curl. Additioanl info: '. var_export($info));
}
curl_close($curl);
}
}
?>