All pastes #1468615 Raw Edit

other.php

public php v1 · immutable
#1468615 ·published 2009-06-21 10:42 UTC
rendered paste body
<?phpif (!defined('RAPIDLEECH'))  {  require_once("404.php");  exit;  }  function auto_del($delay = 0){    global $auto_del_time;	if($delay==0){$delay = $auto_del_time;}    $current_time = getdate();    $dir = dir(DOWNLOAD_DIR);    while(false !== ($file = $dir->read()))      {      if($file != "." && $file != ".." && (!is_array($forbidden_filetypes) || !in_array(strtolower(strrchr($file, ".")), $forbidden_filetypes))&& is_file(DOWNLOAD_DIR.$file) && substr($file,-4,4)!=".asp"&& substr($file,-4,4)!=".htm"&& substr($file,-5,5)!=".html"&& substr($file,-4,4)!=".php" && substr($file,-4,4)!=".lst")        {        $file = DOWNLOAD_DIR.$file;        $time = filemtime($file);        if ($delay>0)		// Auto delete files with expired time OR files with very litle size (below 5 Byte);  this is crap, -_-'                //if ( (($time + ($delay*60*60)) < $current_time["0"]) || (filesize($file)<5) )				                if( ($time + ($delay*60*60)) < $current_time["0"])                        @unlink($file);        }      }    $dir->close();}function flush_all(){	//purge_files(0.00000000000001);	auto_del(0.00000000000001);		// force show_all mode to relist the LST file	_create_list();	updateListInFile();}function ipcounter(){   	global $heute;	global $delay_per_ip;	global $ipmu;	$xhandle=opendir("tmp");	while($buin = readdir($xhandle)) {		if(eregi("$ipmu",$buin)) { $heute=$heute+1; }	}	$ckusr = decEnti((string)base64_decode(urldecode($_COOKIE['rxyzusr'])));	$ckusr = (is_numeric($ckusr) ? $ckusr : '0');	if(($ckusr!='')&&($ckusr > $heute)){		$heute = $ckusr;	}	else{		setcookie('rxyzusr',base64_encode(encEnti((string)$heute)),time() + ($delay_per_ip*60*60));	}	closedir($xhandle);	error_reporting(0);	$time=time();	$xhandle=opendir("tmp");	while($buin = readdir($xhandle)) {		if($buin==".") {$buin="fu"; }		if($buin=="..") {$buin="fu"; }		$xd=filemtime("tmp/$buin");		$altr=$time-$xd;		if($altr>$delay_per_ip*60*60) {			if(is_dir("tmp/$buin")) {				rmdir("tmp/$buin"); 			}			else {				unlink("tmp/$buin"); 			}		}	}	closedir($xhandle);error_reporting(1);}function rotN($s, $n){    $s2 = "";    for($i = 0; $i < strlen($s); $i++){        $char2 = $char = ord($s{$i});        $cap = $char & 32;        $char &= ~ $cap;        $char = $char > 64 && $char < 123 ? (($char - 65 + $n) % 26 + 65) : $char;        $char |= $cap;        if($char < 65 && $char2 > 64 || ($char > 90 && $char < 97 && ($char2 < 91 || $char2 > 96))) $char += 26;        else if($char > 122 && $char2 < 123) $char -= 52;        if(strtoupper(chr($char2)) === chr($char2)) $char = strtoupper(chr($char)); else $char = strtolower(chr($char));        $s2 .= $char;    }    return $s2;}function encEnti($v){  $rt = "";  for($i=0; $i < strlen($v); $i++){	$ktr = strtoupper(dechex(ord($v{$i})));	$rt.=$ktr;   }  return $rt;}function decEnti($c){  $pt = "";  $pj = strlen($c); $i=0;  if($pj % 2!=0){return false;}  while($i<$pj){    $hs = chr(hexdec(substr($c, $i, 2)));    $pt.=$hs;    $i= $i + 2;  }  return $pt;}function get_real_ip(){     $ipRL = false;     if(!empty($_SERVER['HTTP_CLIENT_IP']))     {          $ipRL = $_SERVER['HTTP_CLIENT_IP'];     }     if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))     {          $ips = explode(", ", $_SERVER['HTTP_X_FORWARDED_FOR']);          if($ipRL)          {               array_unshift($ips, $ipRL);               $ipRL = false;          }          for($i = 0; $i < count($ips); $i++)          {               if(!preg_match("/^(10|172\.16|192\.168)\./i", $ips[$i]))               {                    if(version_compare(phpversion(), "5.0.0", ">="))                    {                         if(ip2long($ips[$i]) != false)                         {                              $ipRL = $ips[$i];                              break;                         }                    }                    else                    {                         if(ip2long($ips[$i]) != - 1)                         {                              $ipRL = $ips[$i];                              break;                         }                    }               }          }     }     return ($ipRL ? $ipRL : $_SERVER['REMOTE_ADDR']);}//Check allow / Banned IP Addressfunction chk_this_ip($meth, $user_ip){	global $list_allow_ip, $list_baned_ip;	$ip_allow_ar = array();	if($meth=='is_baned') 	{		$list_ip = $list_baned_ip;	}	elseif($meth=='is_allow')	{		$list_ip = $list_allow_ip;	}	$ip_allow_ar = explode(',', $list_ip);	ksort($ip_allow_ar);	$check_is = false;	$ada_bintang = 0; 	$i=0;	if($meth=='is_allow' && !$ip_allow_ar[$i]){exit('Terminated.!<br>RL Authorization malfunction:: <b>$list_allow_ip</b> is_empty in (config.php)');}		while(!$check_is && ($ip_allow_ar[$i]))	{		$ada_bintang = substr_count($ip_allow_ar[$i], '.*');		if($ada_bintang>0)		{			$sub_ip = substr($ip_allow_ar[$i], 0, strpos($ip_allow_ar[$i],'.*')).".";			$u_ip_ar = explode('.', $user_ip); 			$bit = (int)(3-$ada_bintang);			$u_ip = '';			for($j=0; $j<=$bit; $j++)			{				$u_ip = $u_ip.$u_ip_ar[$j].".";			}			if(trim($u_ip)==trim($sub_ip)){$check_is = true;}		}		else		{			if(trim($user_ip)==trim($ip_allow_ar[$i])){$check_is = true;}		}		$i = (int)($i + 1);	}	return $check_is;}function view_size($size){ if (!is_numeric($size)) {return FALSE;} else {  if ($size >= 1073741824) {$size = round($size/1073741824*100)/100 ."&nbsp;GB";}  elseif ($size >= 1048576) {$size = round($size/1048576*100)/100 ."&nbsp;MB";}  elseif ($size >= 1024) {$size = round($size/1024*100)/100 ."&nbsp;KB";}  else {$size = $size . "&nbsp;B";}  return $size; }}function lnkfilter($siLink){$linkres = $siLink;if(strpos($siLink, "rapid*share.com/")||(strpos($siLink, "rapid^share.com/"))||(strpos($siLink, "rapdshare.com/")))   {	$rssuspect = array('rapid*share.com/','rapid^share.com/','rapdshare.com/');	$rsabs = 'rapidshare.com/';	$linkres = str_replace($rssuspect, $rsabs, $linkres);  }return $linkres;}//encryptionfunction dcd($c){  $pt = ""; $bfC = $c;  if($c=="") {return $pt;}  $rRot = (int)substr($c,-2);  if(!is_numeric($rRot)){   return false;  }  else{   $bfC = strtoupper(substr($c, 0, -2));   $pj = strlen($bfC); $i=0;  }  if($pj % 2!=0){return false;}  while($i<$pj){    $hs = chr(hexdec(substr($bfC, $i, 2)));    $pt.=$hs;    $i= $i + 2;  }  $pt = strrev(rotN($pt, -$rRot));  return $pt;}function autoNext($iset, $noterror){	global $showautoclose;	global $timeautoclose;	$bfRet = "";				 $bfRet="\r\n<script language=javascript>\n";		  $bfRet.="if(window.opener!=null){window.opener.startisdone();}\n";		  $bfRet.="</script>\r\n";				if($iset)		{			 $bfRet.="\r\n<script language=javascript>var autoDL = true;";		}else $bfRet.= "\r\n<script language=javascript>var autoDL;";		if (($showautoclose=="true")&&($noterror))		{			$bfRet.="\r\n<!-- \n var time = ".$timeautoclose.";\nif(autoDL==true){window.opener.nextlink();}\nfunction vbaccept(){\ntime--;frm = document.vbaccept;\nif(frm)frm.submit.value = 'Auto-Close through '+time+'';\n";			$bfRet.="if(time>0){window.setTimeout(\"vbaccept()\",1);}\n else \nif(frm){frm.submit.value = 'done';\nfrm.submit.disabled=0;window.close(self);}}\n";			$bfRet.="if(window.opener!=null){vbaccept(); var da = document.getElementById('tdone'); da.href='javascript:if(autoDL==true){window.opener.nextlink();}window.close(self);'; document.getElementById('txtdone').innerHTML='Done';} \n --></script>";			$bfRet.="<form id=vbaccept name=vbaccept><input type=submit name=submit style='color:#fff;' value=\"done\" disabled></form>";					}		else{			$bfRet.="\r\nif(autoDL==true){window.opener.nextlink();}if(window.opener!=null){\r\n var da = document.getElementById('tdone');  \n da.href='javascript:if(autoDL==true){window.opener.nextlink();} window.close(self);';\n document.getElementById('txtdone').innerHTML='Close';}</script>";				}		return $bfRet;	}function cek_worktime($workstart, $workend){  $tdebug = false;	  $zone=3600*7; // GMT +7 ~ Indonesia  $tn = getdate(strtotime(date("d M Y H:i:s", time() - date("Z") + $zone)));  $dtstr = " Apr 1983 ";  $tgl = "14";  $tnH = $tn["hours"];  $tnM = $tn["minutes"];  $tnS = $tn["seconds"];  if($tnH<10)$tnH='0'.$tnH;  if($tnM<10)$tnM="0".$tnM;  if($tnS<10)$tnS="0".$tnS;    $wstart = strtotime($tgl.$dtstr.$workstart);  $nowUnix = strtotime("$tgl $dtstr $tnH:$tnM:$tnS");  $ws = split(":",$workstart);  $we = split(":",$workend);    if((int)$ws[0]>=(int)$we[0])  {	$tgl = "15";	if((int)$tnH<=$we[0])	{	  $nowUnix = strtotime("$tgl $dtstr $tnH:$tnM:$tnS");	}  }    $wend = strtotime($tgl.$dtstr.$workend);  if($tdebug)  {  echo $tn."<br>";  echo "$tgl $dtstr $tnH:$tnM:$tnS<br>$nowUnix<br>";  echo "$workstart-".$wstart."-".$wend."-$workend";  }  if(($nowUnix-$wstart)>0 && ($wend-$nowUnix)>0) {	  return true;  }  else {	  return false;  }}function is_traficexpire($exp_time){}function get_traffic($filena){	$isinya = Array();	$fl = @fopen($filena, "r");	$buftxt = fgets($fl);		fclose($fl);	$isinya = explode(":", trim($buftxt));	if(!is_numeric($isinya[0]))	{	  $isinya[0] = 0;	}	return $isinya[0];}function write_traffic($fname, $isi){  $fl = fopen($fname, "w");  if(!$fl) {    return FALSE;    }  else    {    if(!flock($fl, LOCK_EX)){      return FALSE;      }    else      {      if(!fwrite($fl, $isi)){        return FALSE;        }      else        {        if(!flock($fl, LOCK_UN)){          return FALSE;          }        else          {          if(!fclose($fl)) {            return FALSE;            }          }        }      }    }  //@fclose($fname);  return TRUE;  }			#============================      function create_hosts_file($host_file = "hosts.php")	{	$fp = opendir(HOST_DIR);	while (($file = readdir($fp)) !== false)		{		if (substr($file, -4) == ".inc")			{			require_once(HOST_DIR.$file);			}		}	if (!is_array($host))		{		print "No host file found";		}	else		{		$fs = fopen(HOST_DIR.$host_file, "wb");		if (!$fs)			{			print "Cannot create hosts file";			}		else			{			fwrite($fs, "<?php\r\n\$host = array(\r\n");			$i = 0;			foreach ($host as $site => $file)				{				if ($i != (count($host) - 1))					{					fwrite($fs, "'".$site."' => '".$file."',\r\n");					}				else					{					fwrite($fs, "'".$site."' => '".$file."');\r\n?>");					}				$i++;				}			closedir($fp);			fclose($fs);			}		}	}function logged_user($u)	{	global $_SERVER;	foreach ($u as $user => $pass)		{		if (strcmp(md5($_SERVER['PHP_AUTH_USER']),$user)===0 && strcmp(md5($_SERVER['PHP_AUTH_PW']),$pass)===0)			return true;		}	return false;	}function utf8_strrev($str){    preg_match_all('/./us', $str, $ar);    return join('',array_reverse($ar[0]));}function is_present($lpage, $mystr, $strerror = "", $head = 0)	{  $strerror = $strerror ? $strerror : $mystr;	if (stristr($lpage, $mystr))		{		html_error($strerror, $head);		}	}function is_notpresent($lpage, $mystr, $strerror, $head = 0)	{	if (!stristr($lpage,$mystr))		{		html_error($strerror, $head);		}	}function insert_location($newlocation)	{	global $nn;	list($location, $list) = explode("?", $newlocation);	$list = explode("&", $list);	print "<form action=\"$location\" method=\"post\">".$nn;	foreach ($list as $l)		{		list($name, $value) = explode("=", $l);		print "<input type=\"hidden\" name=\"$name\" value=\"$value\">".$nn;				}	?><script language="JavaScript">void(document.forms[0].submit());</script></form></body></html>	<?php	flush();	}/*function insert_location($newlocation, $url="", $showurl=false ,$test=false)	{		if ($url && $showurl)			{				echo "<center><b>$url</b></center>\n";				return true;			}		if ($test === false)			{?><script language=javascript>	location.href='<?php echo $newlocation ?>';</script><?php			}				else			{				echo "<center><b>$newlocation</b></center>\n";			}	flush();	return true;	}*/function pause_download()	{	global $pathWithName, $PHP_SELF, $_GET, $nn, $bytesReceived, $fs, $fp;	$status = connection_status();	if (($status == 2 || $status == 3) && $pathWithName && $bytesReceived > -1)    {    flock($fs, LOCK_UN);		fclose($fs);		fclose($fp);    }	}function cut_str($str, $left, $right)  {  $str = substr(stristr($str, $left), strlen($left));  $leftLen = strlen(stristr($str, $right));  $leftLen = $leftLen ? -($leftLen) : strlen($str);  $str = substr($str, 0, $leftLen);  return $str;  }function write_file($file_name, $data, $trunk = 1)  {  if($trunk == 1)    {    $mode = "wb";    }  elseif ($trunk == 0)    {    $mode = "ab";    }  $fp = fopen($file_name, $mode);  if(!$fp)    {    return FALSE;    }  else    {    if(!flock($fp, LOCK_EX))      {      return FALSE;      }    else      {      if(!fwrite($fp, $data))        {        return FALSE;        }      else        {        if(!flock($fp, LOCK_UN))          {          return FALSE;          }        else          {          if(!fclose($fp))            {            return FALSE;            }          }        }      }    }  return TRUE;  }function read_file($file_name, $count = -1)  {  if($count == -1)    {    $count = filesize($file_name);    }  $fp = fopen($file_name, "rb");  flock($fp, LOCK_SH);  $ret = fread($fp, $count);  flock($fp, LOCK_UN);  fclose($fp);  return $ret;  }function pre($var)  {  echo "<pre>";  print_r($var);  echo "</pre>";  }function getmicrotime()  {  list($usec, $sec) = explode(" ",microtime());  return ((float)$usec + (float)$sec);  }function html_error($msg, $head = 1)  {  global $PHP_SELF;  if ($head == 1)    {    ?><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><title>Upps...</title><style type="text/css"><!--@import url("<?php print IMAGE_DIR; ?>style_sujancok.css");--></style></head><body><center><img src="<?php echo IMAGE_DIR.'rl_lgo.gif'?>" alt="Rx08 V2.3"></center><br><br><?php    }    ?><center><?php echo "<span style=\"color:red; background-color:#fec; padding:3px; border:2px solid #FFaa00; line-height:25px\"><b>$msg</b></span><br><br>"; echo "<a id=\"tdone\" href=\"".$PHP_SELF."\">[&nbsp;<b><span id=\"txtdone\">Back to main</span>&nbsp;]</a><br>";echo autoNext(isset($_GET["idx"]),false);?></center></body></html><?php  exit;  }function sec2time($time)  {  $hour = round($time / 3600, 2);  if($hour >= 1)    {    $hour = floor($hour);    $time -= $hour * 3600;    }  $min = round($time / 60, 2);  if($min >= 1)    {    $min = floor($min);    $time -= $min * 60;    }  $sec = $time;  $hour = ($hour > 1) ? $hour." hours " : ($hour == 1) ? $hour." hour " : "";  $min = ($min > 1) ? $min." minutes " : ($min == 1) ? $min." minute " : "";  $sec = ($sec > 1) ? $sec." seconds" : ($sec == 1 || $sec == 0) ? $sec." second" : "";  return $hour.$min.$sec;  }function bytesToKbOrMbOrGb($bytes) {	if (is_numeric ( $bytes )) {		if ($bytes >= (1024 * 1024 * 1024)) {			$size = round ( $bytes / (1024 * 1024 * 1024), 2 ) . " GB";		} elseif ($bytes >= (1024 * 1024)) {			$size = round ( $bytes / (1024 * 1024), 2 ) . " MB";		} elseif ($bytes >= (1024)) {			$size = round ( $bytes / 1024, 2 ) . " KB";		} else {			$size = $bytes . " B";		}	} else {		$size = "Unknown";	}	return $size;}  function updateListInFile($list)  {  if(count($list) > 0)    {    foreach($list as $key => $value)      {      $list[$key] = serialize($value);      }    if(!@write_file(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst", implode("\r\n", $list)."\r\n") && count($list) > 0)      {      return FALSE;      }    else      {      return TRUE;      }    }  elseif (@file_exists(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst"))    {		//return unlink(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst");		return fopen(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst", "w");    }  }function _cmp_list_enums($a,$b)  {  return strcmp($a["name"],$b["name"]);  }function _create_list()  {  global $list, $_COOKIE, $show_all, $forbidden_filetypes;  $glist = array();  if(($show_all === true) & ($_COOKIE["showAll"] == 1))    {    $dir = dir(DOWNLOAD_DIR);    while(false !== ($file = $dir->read()))      {      if($file != "." && $file != ".." && (!is_array($forbidden_filetypes) || !in_array(strtolower(strrchr($file, ".")), $forbidden_filetypes))&& is_file(DOWNLOAD_DIR.$file) && basename($file) != "Rx08_2208081410_f1L3Z.lst")        {        $file = DOWNLOAD_DIR.$file;        $time = filectime($file);        while(isset($glist[$time])) $time++;        $glist[$time] = array("name" => realpath($file),                              "size" => bytesToKbOrMbOrGb(filesize($file)),                              "date" => $time);        }      }    $dir->close();    @uasort($glist,"_cmp_list_enums");    }  else    {    if(@file_exists(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst"))      {      $glist = file(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst");      foreach($glist as $key => $record)        {        foreach(unserialize($record) as $field => $value)          {          $listReformat[$key][$field] = $value;          if($field == "date") $date = $value;          }        $glist[$date] = $listReformat[$key];        unset($glist[$key], $glistReformat[$key]);        }      }    }  $list = $glist;  }function checkmail($mail)  {  if(strlen($mail) == 0)    {    return false;    }  if(!preg_match("/^[a-z0-9_\.-]{1,20}@(([a-z0-9-]+\.)+(com|net|org|mil|".   "edu|gov|arpa|info|biz|inc|name|[a-z]{2})|[0-9]{1,3}\.[0-9]{1,3}\.[0-".   "9]{1,3}\.[0-9]{1,3})$/is", $mail))    {    return false;    }  return true;  }/* Fixed Shell exploit by: icedog */function fixfilename($fname,$fpach='')	{		$f_name=basename($fname);		$f_dir=dirname(eregi_replace("\.\./", "", $fname));		$f_dir=($f_dir == '.') ? '' : $f_dir;		$f_dir=eregi_replace("\.\./", "", $f_dir);		$fpach=eregi_replace("\.\./", "", $fpach);		$f_name=eregi_replace("\.(php|hta|pl|cgi|sph)", ".xxx", $f_name);		$ret= ($fpach) ? $fpach.DIRECTORY_SEPARATOR.$f_name : ($f_dir ? $f_dir.DIRECTORY_SEPARATOR : '').$f_name;		return $ret;	}function getfilesize($f)	{		global $is_windows;		$stat=stat($f);				if ($is_windows) return sprintf("%u", $stat[7]);		if (($stat[11] * $stat[12]) < 4*1024*1024*1024) return sprintf("%u", $stat[7]);			global $max_4gb;		if ($max_4gb === false)			{				$tmp_=trim(@shell_exec(" ls -Ll ".@escapeshellarg($f)));				while (strstr($tmp_,'  ')) { $tmp_=@str_replace('  ',' ',$tmp_); }				$r=@explode(' ',$tmp_);				$size_=$r[4];			}				else			{				$size_=-1;			}			return $size_;	}function bytesToKbOrMb($bytes){$size = ($bytes >= (1024 * 1024 * 1024 * 1024)) ? round($bytes / (1024 * 1024 * 1024 * 1024), 2)." TB" : (($bytes >= (1024 * 1024 * 1024)) ? round($bytes / (1024 * 1024 * 1024), 2)." GB" : (($bytes >= (1024 * 1024)) ? round($bytes / (1024 * 1024), 2)." MB" : round($bytes / 1024, 2)." KB"));return $size;}function defport($urls)	{		if ($urls["port"] !== '' && isset($urls["port"])) return $urls["port"];				switch (strtolower($urls["scheme"]))			{				case "http" : return '80';				case "https" : return '443';				case "ftp" : return '21';			}	}function getSize($file)	{        $size = filesize($file);        if ($size < 0)            if (!(strtoupper(substr(PHP_OS, 0, 3)) == 'WIN'))                $size = trim(`stat -c%s $file`);            else{                $fsobj = new COM("Scripting.FileSystemObject");                $f = $fsobj->GetFile($file);                $size = $file->Size;            }        return $size;    }function purge_files($delay)  {	if (file_exists(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst") && is_numeric($delay) && $delay > 0)	{		$files_lst = file(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst");		$files_new = "";		foreach ($files_lst AS $files_line)		{			$files_data = unserialize(trim($files_line));			if (file_exists($files_data["name"]) && is_file($files_data["name"]))			{				if (time() - $files_data["date"] >= $delay*60*60)				{					@unlink($files_data["name"]);					//file_put_contents("purge.log", date("d-m-Y H:i:s")." DELETE ".$files_data["name"]."\r\n", FILE_APPEND);				}				else				{					$files_new .= $files_line;					//file_put_contents("purge.log", date("d-m-Y H:i:s")." PASS ".$files_data["name"]."\r\n", FILE_APPEND);				}			}			else			{				//file_put_contents("purge.log", date("d-m-Y H:i:s")." MISSING ".$files_data["name"]."\r\n", FILE_APPEND);			}		}		//file_put_contents("purge.log", "\r\n\r\n", FILE_APPEND);		file_put_contents(CONFIG_DIR."Rx08_2208081410_f1L3Z.lst", $files_new);	}  }// PHP4 compatibilityif (!function_exists("file_put_contents") && !defined("FILE_APPEND")){	define("FILE_APPEND", 1);	function file_put_contents($n, $d, $flag = false)	{		$mode = ($flag == FILE_APPEND || strtoupper($flag) == "FILE_APPEND") ? "a" : "w";		$f = @fopen($n, $mode);		if ($f === false)		{			return 0;		}		else		{			if (is_array($d))			{				$d = implode($d);			}			$bytes_written = fwrite($f, $d);			fclose($f);			return $bytes_written;		}	}}function calcUsedSpace() {	$total_size = 0;	global $list;	if (! $list) {		_create_list ();	}	foreach ( $list as $key => $file ) {		if (file_exists ( $file ["name"] )) {			$total_size += filesize ( $file ["name"] );		}	}	return $total_size;}if (!function_exists("file_get_contents")){	function file_get_contents($filename, $incpath = false, $resource_context = null)	{		if (false === $fh = fopen($filename, "rb", $incpath))		{			trigger_error("file_get_contents() failed to open stream: No such file or directory", E_USER_WARNING);			return false;		}		clearstatcache();		if ($fsize = @filesize($filename))		{			$data = fread($fh, $fsize);		}		else		{			$data = "";			while (!feof($fh))			{				$data .= fread($fh, 8192);			}		}		fclose($fh);		return $data;	}}?>