PHP - Fehler?!

Smokers

Grünschnabel
Hallo liebe Leute ^^

aaalso hab mir mal kurz folgendes kleinen Script gemacht.
Es ist eigentlich so simpel wie möglich , jedoch traue ich jedes Mal meinen Augen nicht wenn ich die Ausgabe sehe...

das Script lautet :

PHP:
<?php
$sText = shell_exec('tasklist /FI "STATUS ne running" /FI "USERNAME ne Benni"');

$aTasks = explode(" ",$sText);


for($i=0;$i<count($aTasks);$i++) {
	if($aTasks[$i] == "" || empty($aTasks[$i])) {
		unset($aTasks[$i]);
		
	}
}

foreach ($aTasks as $sTask => $sValue) {
	echo $sValue ." <br /> \n";
}

?>

Sprich ... Tasklist, und jedes wort / Zahl wert in nen array wert schreiben und dann Zeilenweise ausgeben.

( Später sollen mal nur noch bestimmte Prozesse ausgegeben werden, aber das ja erstmal egal... )

Die Ausgabe jedoch verblüfft mich und ich weis nicht mehr weiter....

Code:
Abbildname <br /> 
PID <br /> 
Sitzungsname <br /> 
Sitz.-Nr. <br /> 
Speichernutzung
========================= <br /> 
===== <br /> 
================ <br /> 
========== <br /> 

===============
System <br /> 
Idle <br /> 
Process <br /> 
Console <br /> 
28 <br /> 
K
System <br /> 
4 <br /> 
Console <br /> 
236 <br /> 

K
smss.exe <br /> 
472 <br /> 
Console <br /> 
412 <br /> 
K
csrss.exe <br /> 
804 <br /> 
Console <br /> 
7.544 <br /> 
K
winlogon.exe <br /> 

860 <br /> 
Console <br /> 
4.476 <br /> 
K
services.exe <br /> 
904 <br /> 
Console <br /> 
3.808 <br /> 
K
lsass.exe <br /> 
916 <br /> 

Console <br /> 
8.644 <br /> 
K
ati2evxx.exe <br /> 
1076 <br /> 
Console <br /> 
3.504 <br /> 
K
svchost.exe <br /> 
1088 <br /> 
Console <br /> 

7.452 <br /> 
K
svchost.exe <br /> 
1168 <br /> 
Console <br /> 
6.804 <br /> 
K
svchost.exe <br /> 
1256 <br /> 
Console <br /> 
32.908 <br /> 

K
svchost.exe <br /> 
1292 <br /> 
Console <br /> 
5.688 <br /> 
K
Smc.exe <br /> 
1332 <br /> 
Console <br /> 
11.228 <br /> 
K
ati2evxx.exe <br /> 

1400 <br /> 
Console <br /> 
4.384 <br /> 
K
svchost.exe <br /> 
1516 <br /> 
Console <br /> 
6.168 <br /> 
K
svchost.exe <br /> 
1600 <br /> 

Console <br /> 
11.352 <br /> 
K
spoolsv.exe <br /> ---> Bis hier lief alles ganz okay... o.O
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
1708 <br /> 

Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
7.840 <br /> 
K
apache.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

316 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
22.976 <br /> 
K
AVKProxy.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

340 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
16.044 <br /> 
K
AVKService.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

396 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
6.492 <br /> 
K
AVKWCtl.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

416 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
87.216 <br /> 
K
StarWindServiceAE.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

604 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
3.856 <br /> 
K
svchost.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

640 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
7.400 <br /> 
K
winvnc.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

696 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
6.164 <br /> 
K
apache.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

1372 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
26.404 <br /> 
K
alg.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

3288 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
5.848 <br /> 
K
wmiprvse.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

3352 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
7.436 <br /> 
K
svchost.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

588 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
5.696 <br /> 
K
FileZillaServer.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

2860 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
3.424 <br /> 
K
cmd.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

7856 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
4.828 <br /> 
K
tasklist.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

3116 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
6.540 <br /> 
K
wmiprvse.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

4236 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
8.032 <br /> 
K
 <br />


Was mache ich falsch? Wo liegt das Problem?

...hääää?
 
...hääää?
Was ist denn das Problem?
Der Algorithmus macht genau das was er soll...

Schon mal print_r von deinem bereinigten Array gemacht?
 
Zuletzt bearbeitet:
Ich glaub er meint vielleicht die ganzen Zeilenumbrüche am ende.

PHP:
if(trim($aTasks[$i]) == "" || empty($aTasks[$i])) {

Ich weis jetzt nicht genau was die Leerzeilen verursacht aber Trim() könnte vielleicht helfen.
 
Also entweder hab ich nen Denkfehler oder da is was faul,

Der algo soll JEDEN array wert indem kein text steht,der "" ist also NULL oder der emptay true macht, löschen.

Unten werden dann alle array werte zeilenweise ausgegeben.
Wenn mein algo en würde, dürfte es keine leeren zeilen geben

wie du an den

"
<br />
<br />
<br />
"
's

siehst ist dies aber nicht der Fall o.O


\\ mhh trim hab ich auch schon dran gedacht.... ich setz es mal dazwischen
(
PHP:
<?php
$sText = shell_exec('tasklist /FI "STATUS ne running" /FI "USERNAME ne Benni"');

$aTasks = explode(" ",$sText);


for($i=0;$i<count($aTasks);$i++) {
	trim($aTasks[$i]);
}

for($i=0;$i<count($aTasks);$i++) {
	if($aTasks[$i] == "" || empty($aTasks[$i])) {
		unset($aTasks[$i]);
	}
}


foreach ($aTasks as $sTask => $sValue) {
	echo $sValue ." <br /> \n";
}


?>
)


Aber auch so , keine andere Wirkung.


Auch live zu sehen unter : http://smokers.dnsalias.com/tasklist.php
 
Zuletzt bearbeitet:
wenn dann so

PHP:
<?php
$sText = shell_exec('tasklist /FI "STATUS ne running" /FI "USERNAME ne Benni"');

$aTasks = explode(" ",$sText);


for($i=0;$i<count($aTasks);$i++) {
    if(trim($aTasks[$i]) == "") {
        unset($aTasks[$i]);
    }
}


foreach ($aTasks as $sTask => $sValue) {
    echo $sValue ." <br /> \n";
}


?>
 
Zuletzt bearbeitet:
die ausgabe bleibt

Code:
Abbildname <br /> 
PID <br /> 
Sitzungsname <br /> 
Sitz.-Nr. <br /> 
Speichernutzung
========================= <br /> 
===== <br /> 
================ <br /> 
========== <br /> 

===============
System <br /> 
Idle <br /> 
Process <br /> 
0 <br /> 
Console <br /> 
0 <br /> 
28 <br /> 
K
System <br /> 
4 <br /> 

Console <br /> 
0 <br /> 
236 <br /> 
K
smss.exe <br /> 
472 <br /> 
Console <br /> 
0 <br /> 
412 <br /> 
K
csrss.exe <br /> 

804 <br /> 
Console <br /> 
0 <br /> 
5.796 <br /> 
K
winlogon.exe <br /> 
860 <br /> 
Console <br /> 
0 <br /> 
4.476 <br /> 

K
services.exe <br /> 
904 <br /> 
Console <br /> 
0 <br /> 
3.808 <br /> 
K
lsass.exe <br /> 
916 <br /> 
Console <br /> 
0 <br /> 

8.652 <br /> 
K
ati2evxx.exe <br /> 
1076 <br /> 
Console <br /> 
0 <br /> 
3.504 <br /> 
K
svchost.exe <br /> 
1088 <br /> 
Console <br /> 

0 <br /> 
7.444 <br /> 
K
svchost.exe <br /> 
1168 <br /> 
Console <br /> 
0 <br /> 
6.792 <br /> 
K
svchost.exe <br /> 
1256 <br /> 

Console <br /> 
0 <br /> 
32.460 <br /> 
K
svchost.exe <br /> 
1292 <br /> 
Console <br /> 
0 <br /> 
5.688 <br /> 
K
Smc.exe <br /> 

1332 <br /> 
Console <br /> 
0 <br /> 
10.964 <br /> 
K
ati2evxx.exe <br /> 
1400 <br /> 
Console <br /> 
0 <br /> 
4.384 <br /> 

K
svchost.exe <br /> 
1516 <br /> 
Console <br /> 
0 <br /> 
6.168 <br /> 
K
svchost.exe <br /> 
1600 <br /> 
Console <br /> 
0 <br /> 

11.352 <br /> 
K
spoolsv.exe <br /> 
 <br /> 
1708 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
7.840 <br /> 
K
apache.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

316 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
22.976 <br /> 
K
AVKProxy.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

340 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
16.056 <br /> 
K
AVKService.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

396 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
6.500 <br /> 
K
AVKWCtl.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

416 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
79.420 <br /> 
K
StarWindServiceAE.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

604 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
3.856 <br /> 
K
svchost.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

640 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
7.400 <br /> 
K
winvnc.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

696 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
6.164 <br /> 
K
apache.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

1372 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
29.272 <br /> 
K
alg.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

3288 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
5.848 <br /> 
K
wmiprvse.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

3352 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
7.436 <br /> 
K
svchost.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

588 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
5.696 <br /> 
K
FileZillaServer.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

2860 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
3.424 <br /> 
K
cmd.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

5988 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
4.824 <br /> 
K
tasklist.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

6544 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
6.548 <br /> 
K
wmiprvse.exe <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

11492 <br /> 
Console <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 

0 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
 <br /> 
8.028 <br /> 
K
 <br />


Was sind das für dämliche array values...?! .. warum hauen die nicht ab nach unset?! -.-'''
 
gute Frage man könnte ja auch nen neues Anlegen.

so geht es auf jedenfall.

PHP:
<pre>
<?php
$sText = shell_exec('tasklist /FI "STATUS ne running" /FI "USERNAME ne Benni"');

$aTasks = explode(" ",$sText);
$values = Array();

for($i=0;$i<count($aTasks);$i++) {
    if(trim($aTasks[$i]) != "") {
        array_push($values, $aTasks[$i]);
    }
}


unset($aTasks);
var_dump($values);
?> 
</pre>
 
Mhh , okay, danke.

Aber irgendwie wüsst ich trotzdem gern wo der kram her kommt :D

Aber danke erstmal für das Workarround, ich arbeite einfach mit dem neuen array dann weiter....
 
Zurück