RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts</strong | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.69% (5.89%*) • Home Loan Fixed: 5.39% (6.59%*) • Fixed: 5.39% (6.59%*) • Variable: 5.69% (5.89%*) • Investment IO: 5.69% (6.48%*) • Investment PI: 5.39% (6.59%*)

Create QR Codes with Google Charts

QR codes are a popular type of two-dimensional barcode. They are also known as hardlinks or physical world hyperlinks. QR Codes store up to 4,296 alphanumeric characters of arbitrary text. This text can be anything, for example URL, contact information, a telephone number, even random text. QR codes can be read by an optical device with the appropriate software. Such devices range from dedicated QR code readers to mobile phones (if you have a barcode scanner application it's likely it already reads QR codes).

This snippet is to support an article on our website: Include QR Codes on Your Website.

The following code utilizes the Google Charts API to render the resulting code.

1
<?php 
2
/*
3
 Create QR Codes with Google Charts
4
 Article: Include QR Codes on Your Website
5
 http://www.beliefmedia.com/qr-codes-website
6
*/
7
 
8
function beliefmedia_google_qrcode($url, $w ='150', $ec='L', $margin='0') {
9
  return '<img src="http://chart.apis.google.com/chart?chs=' . $w . 'x' . $w . '&cht=qr&chld=' . strtoupper($ec) . '|' . $margin . '&chl=' . urlencode($url) . '" alt="' . $alt . '" width="' . $w . '" height="' . $w .'"/>';
10
}
11
 
12
/* Usage */
13
$url = 'This is text. Can be anything';
14
echo beliefmedia_google_qrcode($url, $w ='150', $ec='L', $margin='0');

WordPress version here.

■ ■ ■

 
Download our complimentary 650-page guide on marketing for mortgage brokers. We'll show you exactly how we generate billions in volume for our clients.
Finance Guide, Cropped Top and Bottom
  Timezone: 1 · [ CHANGE ]

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment