PHP database demo that integrates with the "pic2shop pro" barcode scanner app for iOS and Android
Switch branches/tags
Nothing to show
Clone or download
Benoit Maison
Benoit Maison remove BitDeli badge
Latest commit 33f79ee Jul 19, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information. remove BitDeli badge Jul 19, 2016
p2spro.php replace sql_escape_string with SQLite3::escapeString for compatibilit… Jul 19, 2016


Single-file PHP database that integrates with mobile barcode scanner app pic2shop® PRO (Android and iOS).

This is not a barcode scanner. This code demonstrates how to use pic2shop PRO to build a barcode-enabled online database.

About pic2shop PRO

Pic2shop PRO is a paid app available for iOS and Android. It reads EAN13, EAN8, UPC-A, UPC-E, Code 39, Code 93, Code 128, ITF (Interleaved 2 of 5), Standard 2 of 5 (aka Code 25 or Ind2of5) and Codabar (aka USD-4, NW-7) barcodes. After each scan, the app displays a user-defined url with the barcode string as parameter in the embedded web browser. EAN and UPC codes can be read with fixed-focus cameras, such as the iPod Touch 4th gen, the iPad2, the iPad front camera and many Android devices.

[Pic2shop PRO] 1 is developed by [Vision Smarts] 2.


The purpose of this sample code is to demonstrate how to integrate a web app with the mobile app pic2shop PRO. It uses PHP and SQLite but the same results can easily be achieved with other web frameworks.

Automatic app configuration link (formats, Home page, Lookup page) via:


Start a scan from a link in the page (with the option to override the lookup target) via:


Insert barcode data into a field via a javascript callback:


Image upload via:

<input type="file" accept="image/*" capture="camera" name="image">

Retrieve GET parameters when the Home or Lookup URLs are fetched.

Retrieve POST parameters when the form is submitted.

Suggestions for extensions

In real settings, a number of improvements would be needed:

  • Replace SQLite with MySQL or PostgreSQL
  • Organize the code in separate files (css, js, html view, php model+controller, etc)
  • Add a style sheet
  • Add better data validation
  • Add user authentication


IPHONE, IPOD and IPAD are trademarks of Apple Inc., registered in the U.S. and other countries. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries. ANDROID is a trademark of Google Inc.