HEX
Server: Apache
System: Linux dotw660 5.10.0-37-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User: web350 (1012)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/clients/client125/web350/web/wp-content/plugins/wp-automatic/inc/class.spintax.php
<?php


if(! class_exists('Spintax')){

class Spintax {
	
 	//spin 
	function spin($html){
		
 		
		for($i = 0 ;$i < 4 ; $i++){
			
			$html = $this->spintax_this($html);
			
			if(! stristr($html, '{')){
				break;
			}
			
		}
		
		return $html;
		
	}

	//one level spin function
	function spintax_this($html){
	
		preg_match_all('{\{([^{}]*?)\}}s', $html, $matches);
	
		$spintaxed_with_brackets = $matches[0];
		$spintaxed_without_brackets = $matches[1];
	
		$i = 0;
		foreach( $spintaxed_without_brackets as $set){
			
				//valid set let's explode to parts
				$parts = explode('|', $set);
				$random = rand(0,count($parts) -1);
				$random_part = $parts[$random];
					
				//replacing the set with the random part
				$html = str_replace($spintaxed_with_brackets[$i],  $random_part , $html);
			 	
	
			$i++;
		}
	
		return $html;
	
	}//one level spin
	
}

}//class exists
?>