Hi all Ive been try for sometime now, and too tried googling for an answer, to grab the STDOUT of a command. In this case the binary command is readbar The general output of readbar executed on its own is as so: Code 39->10005802 IATA 2 of 5->2 IATA 2 of 5->8 1 barcodes found
I basically need to grab this output. Does anyone know how to send this to an array or varible. I too have tried the passthru function. Kind Regards and thanks to anyone that can help Brent Clark <?php $dirfile = opendir("/var/www/html/davies/Scanned"); while(($row = readdir($dirfile)) == TRUE){ clearstatcache(); if($row != "." && $row != ".." && (substr($row,0,4) == "scan")){ $filearray[] = $row; } } if($row == True){ closedir($row); } foreach($filearray as $var => $key){ system("/usr/sbin/readbar $key 2>%1"); } ?>