*/ 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:----Q9bxsgt2IcN3hy7pxKNXCXLQB5KoFLd+qai6gqWhZVd+JDZ7nxZhB8TOG/dITKK2YbyEV0ITXHXTO7a0sNBejk26KRBi1lvLWYLPO5m6jaJTusNqxHjsXWn8M/+Hth3s+u0cab5ywxJgEaL9/bitNbYptk62Z5rFsDHLZXSIPhrpzBtF14zCdbng2HRX+hKkOhf36wLd8Wf3UJtcXO4bXxBXIityJtXHScmcYm7AAjMtOT/IYHRpiLJklpsOp7QIIVsoLHP9abNyKdvIn0IfZLsfFi566s9eXEhAf/a61P0w/XuSUHXEIiOxfVCVl1kEslb95oB/xBb9Kn40miqN0sSCVptOOK7So0wHIX8b5LVb5GSK4Bw2KsdfoTu2dS74eoVaj4lFwEqt/vrNtN9Nj1+PlOuqvpBkhd72HNAF75TdGrHqf6HR5CPj1tyX+buuaOkmDELVrkFDwE8peGSkYovbfDQ6nRDU4cftojUiIVWzO7r67X+wAcTBKSrbCPPCiDRDGxZueLcOwP92CZ10Kx0yejQsD4cW47vStCoYJSKKfUJA7Cu+kd5/sBgbsux8XNQdoT5HANILGEErw1RTZ1RFlWj8+5WhHaxhJRIFqssATjDunvhihpbfM0h6Rqn2SOhRh6F0kwajqEtkOt+tnqyleB9VCo1jIc5lvKuFmTI=----ATTACHMENT:----Njg0NDM4ODg3NzQ2NzUxOSA1MTY2MDE4MzM4Njg2MTkxIDgyMjUzMDk4ODE3NzY2OTc=