<?php
session_start();

	unset($_SESSION['username']);
		unset($_SESSION['password']);
		unset($_SESSION['admin_name']);
	session_destroy();
	header("location: index.php");	
	
	
	
	
	function SENDSMS($host,$port,$username,$password,$phoneno,$message)
	{
		$fp=fsockopen($host,$port,$errno,$errstr);
		if($fp){
			echo "errno: $errno \n";
			echo "	errstr: $ errstr \n";
			return $result;
		}
		fwrite($fp, "GET/?phone=" . rawurlencode($phoneno) . "$Text=" . rawurlencode($message). "HTTP/1.0\n");
		if($username !=""){
			$auth=$username. ":". $password;
			$auth=base64_encode($auth);
			fwrite($fp, "Authorization : Basic". $auth . "\n");
			
		}
		fwrite($fp."\n");
		$res="";
		while(!feof($fp)){
			$res .=fread($fp,1);}
			fclose($fp);
			return $res;
		
		
		
	}
	
	
?>