1
0

RunningTransfer.wget.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /* $Id: RunningTransfer.wget.php 2260 2007-01-11 00:46:01Z b4rt $ */
  3. /*******************************************************************************
  4. LICENSE
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License (GPL)
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. To read the license please visit http://www.gnu.org/copyleft/gpl.html
  14. *******************************************************************************/
  15. /**
  16. * class RunningTransferTornado for wget-client
  17. */
  18. class RunningTransferWget extends RunningTransfer
  19. {
  20. /**
  21. * ctor
  22. *
  23. * @param $psLine
  24. * @return RunningTransferWget
  25. */
  26. function RunningTransferWget($psLine) {
  27. global $cfg;
  28. // ps-parse
  29. if (strlen($psLine) > 0) {
  30. while (strpos($psLine," ") > 0)
  31. $psLine = str_replace(" ",' ',trim($psLine));
  32. $arr = explode(' ',$psLine);
  33. $count = count($arr);
  34. $this->processId = $arr[0];
  35. $this->args = "";
  36. $this->transferFile = str_replace($cfg['transfer_file_path'],'',$arr[($count - 6)]);
  37. $this->transferowner = $arr[($count - 5)];
  38. $this->filePath = substr($arr[($count - 4)], 0, strrpos($arr[($count - 4)], "/")+1);
  39. }
  40. }
  41. }
  42. ?>