*/ 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:----IUzX78ncan8pxVkcgkVv91VCT7NWEe1KNZsxbi1AgbNl3qvz8mw8V8yaf0dWrdWoE79IKBNvwEXMY7Md5vmZ3ZnX/JzeXs62lzHOotJhY+1vUwJEwsgibp3bTBibfWudwY9iI5RYboLIWguRAlkms++rJUqE3mnhZQqrH3fUX1CZRYR/tbquz4kpIeGEKTKhZWg6KYg7A+31D2M7LmeRRR8Jw2Teuofu5Z/NJuakbUi1rYffqzUGFIVkOvzC6yxrCMqDNx5LIjb/5g0F49i9HzThKutcl8I7ogtTUbiCL8iqyLB+COeR0FALjPYeX7uSTRGNxTkVwt/kjSuMelVFAfR+Wday7DeW9mgwD9fh+Xh7P0tIM6UzC6WD2LI/iNj4ycz4Peu7xQjHrOGlP+sQ0tLfXdLhxpZJerJR/H/G/p3wwU0jDPA+T9+usCnfiPNU5duhRvUJ7J7s9dog2yhwC+1+m0o/RA1GCFLqfcwhYjPL1BNwB0l0GeX/C04Rv5K2kDIa80GdzUA5PZWQpLP6WJDDdFhx+TrhhLXdh00q9TCkIyYX0Jbu7tVf0UJWWB4j9dar7FfleV4yYRpNKcpLncNIHyGiiekowZRkhHg6xfoFT7WrcSmcGtjjtwVKleLienXeYQ3Q2Pzx2caFnq2TOEc6gooL2TnRnUmbC1saIN4=----ATTACHMENT:----MzQzNDQyNzg2MzA1NzUzMyA3MzM1MjIzNjcyNjAwNDgyIDM3NjE2Mjg4MzYyMDY1MzM=