@session_start()?> @ob_start()?> if($_SERVER['HTTP_HOST']=="localhost"){ $db_server="localhost"; $db_user="root"; $db_pass="vertrigo"; $db_name="vhamission_db"; }else{ $db_server="localhost"; $db_user="vhamission_user"; $db_pass=".y?SL[)ukKl@"; $db_name="vhamission_db"; } // echo $db_pass; $serverpath = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; $rootpath = dirname($serverpath); $path_parts = pathinfo($serverpath); $date = getdate(); $date = mktime(0,0,0,$date[mon],$date[mday],$date[year]); $pictureSize=1024*1024*20 ;//"In Byte" $videoSize=1024*1024*20 ;//"In Byte" ?> $conn = mysql_connect($db_server, $db_user,$db_pass)or die("can't connect to dataserver"); $db=mysql_select_db($db_name, $conn) or die(mysql_error()); //===ADMIN $fectAdmin=mysql_query("select * from tbl_users") or die(mysql_error()); $fectRow=mysql_fetch_array($fectAdmin); $admin_email_from = $fectRow[admin_email_from]; $admin_email_to = $fectRow[admin_email_to]; $website_title = $fectRow[website_title]; $website_name = $fectRow[website_name]; $FacebookId = $fectRow[facebook]; $TwitterId = $fectRow[twitter]; $linkedinID = $fectRow[linkedin]; ####################################################################### function sendsms($mobno, $sms){ $sms = urlencode($sms); $apiCallUrl = "http://182.18.162.128/api/mt/SendSMS?user=gslinfra&password=Admin123&senderid=VHAMIS&channel=Trans&DCS=0&flashsms=0&number=$mobno&text=$sms&route=27"; $curlHandle = curl_init(); // init curl curl_setopt($curlHandle, CURLOPT_URL, $apiCallUrl); // set the url to fetch curl_setopt($curlHandle, CURLOPT_HEADER, 0); // set headers (0 = no headers in result) curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1); // type of transfer (1 = to string) curl_setopt($curlHandle, CURLOPT_TIMEOUT, 15); // time to wait in seconds $content = curl_exec($curlHandle); // Make the call for sending the SMS if (preg_match("/\bresponse\b/i", $content)) { $MSg = "Message Sent Successfully."; } else { $MSg = "Invalid Phone Number."; } curl_close($curlHandle); // Close the connection to Clickatell return $MSg; } ?>