Current File : //root/panel/versionupdate.php |
<?php
$version="2.7";
if(file_exists("/etc/sentora/panel/version.txt"))
{
$file = fopen("/etc/sentora/panel/version.txt","r");
while(! feof($file))
{
$line=fgets($file);
if(preg_match("/^Version/",$line))
{
$version=trim(str_replace("Version : ","",$line));
}
}
fclose($file);
}
$data = array('action' => 'UpdateVersion', 'version' => $version);
$url="http://hostingraja.info/getserverdetails.php";
$handle = curl_init($url);
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
$value=curl_exec($handle);
if($value!="No Update")
{
shell_exec("wget $value");
$filename_array=explode("/",$value);
$filename=$filename_array[count($filename_array)-1];
echo shell_exec("sh $filename");
}
?>