halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
aramiyarkai
/
public_html
/
admin
/
Upload FileeE
HOME
<?php function send_sms($gateway,$phoneno,$msg) { $sel_sms_gateway = $db->query("select * from sms_gateway where gateway_type='$gateway' and status='1' "); $row_sms_gateway = $db->fetchNextObject($sel_sms_gateway); $username = $row_sms_gateway->username; $password = $row_sms_gateway->password; $sender = $row_sms_gateway->sender_id; $priority = $row_sms_gateway->priority; $stype = $row_sms_gateway->sms_type; $url = $row_sms_gateway->app_url; $api_key = $row_sms_gateway->api_key; $text = urlencode($msg); if($gateway == "bhashsms"){ $fields = "user=$username&pass=$password&sender=$sender&phone=$phoneno&text=$text&priority=$priority&stype=$stype"; } if($gateway == "smscountry"){ $fields = "User=$username&passwd=$password&mobilenumber=$phoneno&message=$text&sid=$sender&mtype=$stype"; } if($gateway == "clockwork"){ // $country_code = $phoneno; // $mobile_number = $country_code.$phoneno; $fields = "key=$api_key&to=$phoneno&content=$text"; } $ch = curl_init(); if (!$ch){die("Couldn't initialize a cURL handle");} $ret = curl_setopt($ch, CURLOPT_URL,$url); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt ($ch, CURLOPT_POSTFIELDS, $fields); $ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $curlresponse = curl_exec($ch); // execute if(curl_errno($ch)) echo 'curl error : '. curl_error($ch); if (empty($ret)) { die(curl_error($ch)); curl_close($ch); // close cURL handler } else { $info = curl_getinfo($ch); curl_close($ch); // close cURL handler echo $curlresponse; //echo "Message Sent Succesfully" ; } } function send_email($from,$to,$cc,$bcc,$subject,$msg,$type="html") { require_once "Mail.php"; $email_host = "aramiyarkai.com"; $email_username = "orders@aramiyarkai.com"; $email_password = "djdb_QNQJQW9"; $headers = array('MIME-Version' => '1.0rn', 'Content-Type' => "text/html; charset=ISO-8859-1rn", 'From' => $from, 'To' => $to, 'Subject' => $subject ); $smtp = Mail::factory('smtp', array( 'host' => 'ssl://'.$email_host, 'port' => '465', 'auth' => true, 'username' => $email_username, //your gmail account 'password' => $email_password // your password )); $mail = $smtp->send($to, $headers, $message); //check mail sent or not if (PEAR::isError($mail)) { echo $mail->getMessage(); } else { echo "success"; return 1; } } ?>