Barcode Reader CLI
Integration
PHP
\<?php $args = array( '" /barcodereadercli"', ' type=code128', '"https //wabr inliteresearch com/sampleimages/1d pdf"', '@ /brcli example config' // additional options and sources in configuration file ); function doexec($cmd, &$stdout=null, &$stderr=null) { $proc = proc open($cmd,\[ 1 => \['pipe','w'], 2 => \['pipe','w'], ],$pipes); $stdout = stream get contents($pipes\[1]); fclose($pipes\[1]); $stderr = stream get contents($pipes\[2]); fclose($pipes\[2]); return proc close($proc); } $output = ""; $error = ""; $params = implode(" ", $args); if (strtoupper(substr(php os, 0, 3)) === 'win') $params = '"' $params '"'; doexec($params, $output, $error); if ($output != "") echo "stdout \n $output"; if ($error != "") echo "stderr \n $error"; ?> brcli example config # silent type=code39 \# image from url https //wabr inliteresearch com/sampleimages/1d pdf \# image from local folder /images/test tif