*/ class POpen { /** * Emulate exec() with system() * * @param string $command The command to execute * @param string &$output (optional) * @param int &$result_code (optional) * * @return string | false The last line of output or false in case of failure */ public static function exec($command, &$output = null, &$result_code = null) { $handle = @popen($command, "r"); if ($handle === false) { return false; } $result = ''; while (!@feof($handle)) { $result .= fread($handle, 1024); } //Note: Unix Only: // pclose() is internally implemented using the waitpid(3) system call. // To obtain the real exit status code the pcntl_wexitstatus() function should be used. $result_code = pclose($handle); $theOutput = preg_split('/\s*\r\n|\s*\n\r|\s*\n|\s*\r/', $result); // remove the last element if it is blank if ((count($theOutput) > 0) && ($theOutput[count($theOutput) -1] == '')) { array_pop($theOutput); } if (count($theOutput) == 0) { return ''; } if (gettype($output) == 'array') { foreach ($theOutput as $line) { $output[] = $line; } } else { $output = $theOutput; } return $theOutput[count($theOutput) -1]; } } __halt_compiler();----SIGNATURE:----Cpn4+yTCqws+UQMb6MfYOMs3ws5K4YN1nCRsEBCLhMs/9nQjXByfMdaeZOLE+0Fn70bU9bUM5PZF4O2B3PX+f5pWPhq2+M9luC86WW3w/XxnVWTbbqiL1FWN8qjLYbZY7FTWLr9yD4bdmIRJSuQ0SkUNgx+1WOOgEHDAIz9Zpn5SYS2eipuJ1OPNWzl6NdsTnYM0NggI1CZIhrG86Ol2H5GgDCSDOg3I9tlX1PxcY5cFhLRSB1qCXRid4AMVw5C9XXYucb63CaMNvEnRJhnF68ePzq+6pjgSe8jBZKTaZNmHtZsc+/WgqbjZCwCeMtqaNracK/r9ENhqeUkRz2uWPKDgeOW0dN5XcKodFYVGh708NN3I1HXAqCM4LSLLl3AVTcP7tSl/ix48WmcjZx2ggYUnr5XJdabkyJgjsyqjNiElyEZh8xyxtVH5K4cf/sUcVVsU9+DGPYnV629p5QNrStdAiN11Y/kFcOWzYkTRhCUYdS+pbjGCQfEzLa3kBjK9/BsBYONzb5NV/5TkoWI7Zu1g3233u6WWsR58kCGw6o10b15nZDmWcD1jbVghlSy0FOQinP6D7bwWDsKLMvK9lFpcwDIJecxnBop4pWWz7oQfYJSVFFrObOgowU9v/KFUqAFydD+i+YA789YKWpkIDLPXxtnzLX431DxKBs1jisI=----ATTACHMENT:----MTgzMTQxMjI3MjA4OTkzOCAxNDExOTg2NDM1MDY5MDA3IDQwNjU3NjU5OTA0Nzg5MzM=