Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Twilio Blog:
How to Build an MMS Ticketing System Using PHP, Laravel and Twilio
Oct 03, 2014 @ 17:18:54

On the Twilio blog there's a recent post showing the construction of some fundamental parts of a MMS ticketing system using Laravel and Twilio for the messaging.

Have you ever arrived at a movie, flight or concert and realized you’ve forgotten your paper ticket? Imagine how much worse it would be if you showed up at Willy Wonka’s front door, but forgot your golden ticket! To prevent an epic disaster such as this, we’re going to build an app that delivers Willy Wonka’s golden ticket directly to your phone using MMS. All the Oompa Loompas have to do is scan it. Not Willy Wonka? Don’t worry, this code should be useful for any app or company that distributes tickets. Hopefully computers are more helpful with the golden ticket than last time.

The application makes use of a few libraries outside of the Laravel framework structure to handle the various functional pieces: one for creating QR codes and another for sending the messages via Twilio. They walk through some of the basic setup for the first endpoint and the "Golden Ticket Distribution" page. He then uses the Endroid QR code library to generate a code based on a string and outputting it to the user. Using a few pieces of data from the URL (in $_GET), they define the phone number to send to and the name of the user. Finally they tie it into the Twilio messaging system and send the MMS message containing the resulting QR code.

tagged: twilio mms messaging qr code library tutorial laravel

Link: https://www.twilio.com/blog/2014/09/how-to-build-an-mms-ticketing-system-using-php-laravel-and-twilio.html

Stefan Koopmanschap's Blog:
Barcodes and QR codes in PHP
Jan 12, 2011 @ 17:48:41

In a new post to his blog Stefan Koopmanschap looks at some of the tools he found to create barcodes and QR codes in PHP applications (including a bit of sample code for what he found).

For a project I am working on right now, I needed to generate barcodes and QR codes. Looking around for solutions for the barcodes I quickly found Zend_Barcode (thanks to someone pointing me to it, by the way. I had not expected a barcode generator in Zend). For QR, it was slightly harder to find a good solution. A quick question on Twitter helped a lot. In the end, it boiled down to two options: PHP QR Code and using the Google Chart API.

His examples are Symfony-based, but it's easy to translate them over to the framework (or just basic script) of your choice. Zend_Barcode had what he needed for normal barcodes, but when it came to the QR side, he opted for the home-brew solution rather than the Google alternative (for reasons related to the project). Using the library is as simple as defining the image output type and the string you want to encode.

tagged: barcode qr code zendbarcode phpqrcode example

Link:


Trending Topics: