Created
August 10, 2016 03:59
-
-
Save clone1018/d32228362dcfae7e46e237e063226e4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php foreach(glob("*.png") as $file): ?> | |
| <br><br> | |
| <img src="<?php echo $file; ?>" alt="" class="img-responsive"> | |
| <code><?php $userHex = `zbarimg $file`; $hex = str_replace('CODE-128:', '', $userHex); echo $userHex; ?></code> | |
| <pre><?php | |
| $explosion = explode('-', $hex); | |
| foreach($explosion as $k => $expl) { | |
| $hex = str_pad($expl, 4, 0, STR_PAD_LEFT); | |
| $bin = unpack("H*", $hex); | |
| echo base_convert($bin[1], 16, 2); | |
| } | |
| ?> | |
| </pre> | |
| <br><br> | |
| <?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment