{"id":5523,"date":"2023-11-06T05:04:48","date_gmt":"2023-11-06T05:04:48","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=5523"},"modified":"2023-11-06T05:06:27","modified_gmt":"2023-11-06T05:06:27","slug":"generate-qr-code-dynamically-using-php","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/","title":{"rendered":"Generate QR Code Dynamically using PHP"},"content":{"rendered":"<p><b>QR Code<\/b> or Quick-Response code is machine-readable code consisting of squares arranged in square grid format. QR code is typically used to store information that can be readable by an imaging device (such as camera). QR codes may be used for various purposes, like displaying info to users, opening web page URLs, downloading mobile apps, adding contacts, etc. The user needs to scan QR code by device camera to view the information associated with the code.<\/p>\n<p>QR code or 2-dimensional barcode can be created dynamically. You can generate QR code using PHP. In this tutorial, we will show you how to <b>generate QR code in PHP<\/b> and save images on the server. You can add text content, email, phone number, contact, URL, and other info to the QR code and generate QR barcode images with PHP.<\/p>\n<h2>PHP QR Code Generator Library<\/h2>\n<p>We will use a custom PHP library to handle the QR code generation operations. This PHP library has a dependency on the GD library. GD extension must be enabled in PHP to generate QR code images.<\/p>\n<p>Before getting started, make sure the GD extension is enabled in the PHP server.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.codexworld.com\/how-to\/install-php-gd-library-windows-server\/\">Install PHP GD Support on Windows Server<\/a><\/li>\n<li><a href=\"https:\/\/www.codexworld.com\/ubuntu-install-php-gd-extension-support-apache-web-server\/\">Install PHP GD Support on Apache Server<\/a><\/li>\n<\/ul>\n<p><span class=\"note\">Note that:<\/span> The PHP QR Code generator library files are included in the source code package.<\/p>\n<h2>Generate QR Code using PHP<\/h2>\n<p>In the following example, we will show you how to create, save, and display QR code with our custom PHP library.<\/p>\n<p><b>Include PHP QR Code generator library:<\/b><\/p>\n<pre><span style=\"color: #007700\">include_once&nbsp;<\/span><span style=\"color: #DD0000\">\"qrcode-lib\/qrlib.php\"<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>Set the folder path where the QR images will be stored:<\/b><\/p>\n<ul>\n<li><code>$IMG_TEMP_DIR<\/code> &#8211; Folder path to save QR code image on the server.<\/li>\n<li><code>$IMG_WEB_DIR<\/code> &#8211; Directory location from where the QR image will be displayed on the web page.<\/li>\n<li><code>$qr_file_path<\/code> &#8211; Full file path to save QR image.<\/li>\n<\/ul>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;Set&nbsp;it&nbsp;to&nbsp;a&nbsp;writable&nbsp;location,&nbsp;a&nbsp;place&nbsp;to&nbsp;store&nbsp;generated&nbsp;QR&nbsp;image&nbsp;files <br \/><\/span><span style=\"color: #0000BB\">$IMG_TEMP_DIR&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">dirname<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">__FILE__<\/span><span style=\"color: #007700\">).<\/span><span style=\"color: #0000BB\">DIRECTORY_SEPARATOR<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">'temp'<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">DIRECTORY_SEPARATOR<\/span><span style=\"color: #007700\">; <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Create&nbsp;directory&nbsp;if&nbsp;not&nbsp;exists <br \/><\/span><span style=\"color: #007700\">if&nbsp;(!<\/span><span style=\"color: #0000BB\">file_exists<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$IMG_TEMP_DIR<\/span><span style=\"color: #007700\">)){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">mkdir<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$IMG_TEMP_DIR<\/span><span style=\"color: #007700\">); <br \/>} <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;QR&nbsp;image&nbsp;directory <br \/><\/span><span style=\"color: #0000BB\">$IMG_WEB_DIR&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'temp\/'<\/span><span style=\"color: #007700\">; <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;QR&nbsp;image&nbsp;file&nbsp;path <br \/><\/span><span style=\"color: #0000BB\">$qr_file_path&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$IMG_TEMP_DIR<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">'qrcode.png'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>Specify configurations to set the Error Correction Level, Size, and Margin of the QR code image:<\/b><\/p>\n<ul>\n<li><code>$errorCorrectionLevel<\/code> &#8211; Specify the error correction level of the QR code.\n<ul>\n<li>Level L (Low) &#8211; 7% of data bytes can be restored.<\/li>\n<li>Level M (Medium) &#8211; 15% of data bytes can be restored.<\/li>\n<li>Level Q (Quartile) &#8211; 25% of data bytes can be restored.<\/li>\n<li>Level H (High) &#8211; 30% of data bytes can be restored.<\/li>\n<\/ul>\n<\/li>\n<li><code>$matrixPointSize<\/code> &#8211; Specify the size of the QR code matrix point.<\/li>\n<li><code>$margin<\/code> &#8211; Set the margin between the QR code and the background.<\/li>\n<\/ul>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;Additional&nbsp;config <br \/><\/span><span style=\"color: #0000BB\">$errorCorrectionLevel&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'L'<\/span><span style=\"color: #007700\">;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/'L','M','Q','H' <br \/><\/span><span style=\"color: #0000BB\">$matrixPointSize&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">10<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$margin&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">2<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>Specify content to be stored in the QR code:<\/b><\/p>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;QR&nbsp;code&nbsp;content <br \/><\/span><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'PHP&nbsp;QR&nbsp;Code&nbsp;Generated&nbsp;by&nbsp;CodexWorld&nbsp;:)'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>Use the <code>png()<\/code> method of the QRcode class to generate a QR code with PHP:<\/b><br \/>\nThe QR code will be generated and stored in the specified folder on the server.<\/p>\n<pre><span style=\"color: #0000BB\">QRcode<\/span><span style=\"color: #007700\">::<\/span><span style=\"color: #0000BB\">png<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$qrContent<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$qr_file_path<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$errorCorrectionLevel<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$matrixPointSize<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$margin<\/span><span style=\"color: #007700\">);&nbsp;&nbsp;<\/span><\/pre>\n<p><b>Display QR code in HTML:<\/b><br \/>\nUse <span style=\"color: rgb(186, 98, 54);\">&lt;<span style=\"color: rgb(186, 98, 54);\">img<\/span>&gt;<\/span> tag to display the QR code on the web page.<\/p>\n<pre style=\"color: rgb(95, 94, 78);\"><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">img<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"<span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">$IMG_WEB_DIR<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">basename<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$qr_file_path<\/span><span style=\"color: #007700\">);&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>\"<\/span> \/&gt;<\/span><\/pre>\n<h2>Create Different Types of QR Code with PHP<\/h2>\n<p>Here are some examples to generate different types of QR code images using PHP.<\/p>\n<p><b>URL QR Code:<\/b><br \/>\nInclude the protocol (HTTP or HTTPS) to recognize the QR code as a webpage URL.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'https:\/\/www.codexworld.com\/'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>App Download Link QR Code:<\/b><br \/>\nThe Google Play Store app link should be in the following format.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'market:\/\/details?id=com.codexworld'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p>The Apple App Store app link should be in the following format.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'https:\/\/apps.apple.com\/in\/app\/facebook\/id284882215'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>Email QR Code:<\/b><br \/>\nUse the following format to create a QR code with an email address.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'mailto:john.doe@gmail.com'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p>QR code for an email address with subject and body message:<\/p>\n<ul>\n<li>The text used in the subject and body should be an encoded string. You can use <code>urlencode()<\/code> function to encode string in PHP.<\/li>\n<\/ul>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'mailto:email@example.com?subject=Email%20Subject&amp;body=Body%20goes%20here.'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>Phone Number QR Code:<\/b><br \/>\nUse the phone number with the country code in the following format.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'tel:+15556667777'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>SMS QR Code:<\/b><br \/>\nUse a phone number with a country code to send SMS\/MMS to a number.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'sms:+18005556161'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p>You can pre-filled message text in SMS QR.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'sms:+18005556161:This%20is%20my%20text%20message.'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p><b>Contact QR Code:<\/b><br \/>\nCreate a contact QR code with name, email, phone, and address.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'MECARD:N:Doe,John;ADR:76 9th Avenue, 4th Floor, New York, NY 10011;TEL:15556667777;EMAIL:john.doe@example.com;;'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<p>Use the following format to create vCard QR code.<\/p>\n<pre><span style=\"color: #0000BB\">$qrContent&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">' <br \/>&nbsp;&nbsp;&nbsp;&nbsp;BEGIN:VCARD <br \/>&nbsp;&nbsp;&nbsp;&nbsp;VERSION:3.0 <br \/>&nbsp;&nbsp;&nbsp;&nbsp;N:Doe;John;;; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;FN:John&nbsp;Doe <br \/>&nbsp;&nbsp;&nbsp;&nbsp;TITLE:Software&nbsp;Engineer <br \/>&nbsp;&nbsp;&nbsp;&nbsp;EMAIL;TYPE=INTERNET;TYPE=WORK;TYPE=PREF:john.doe@gmail.com <br \/>&nbsp;&nbsp;&nbsp;&nbsp;URL;TYPE=Homepage:https:\/\/example.com <br \/>&nbsp;&nbsp;&nbsp;&nbsp;END:VCARD <br \/>'<\/span><span style=\"color: #007700\">;<\/span><\/pre>\n<h2>Conclusion<\/h2>\n<p>PHP QR Code generator script helps you to create QR code images dynamically using PHP. Use this custom library to generate QR code in PHP. In this example, we have created all the commonly used QR codes (URL, App, Email, Contact, MeCard, vCard, Phone, etc) with PHP. You can enhance and customize the code to integrate QR code creation functionality in the website using PHP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>QR Code or Quick-Response code is machine-readable code consisting of squares arranged in square grid format. QR code is typically used to store information that can be readable by an imaging device (such as camera). <\/p>\n","protected":false},"author":1,"featured_media":5526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[166,14,244,379],"class_list":["post-5523","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-library","tag-php","tag-qr","tag-qr-code","cat-4-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Generate QR Code Dynamically using PHP - CodexWorld<\/title>\n<meta name=\"description\" content=\"PHP QR Code generator script - Create QR code dynamically using PHP. Example code to generate QR code image in PHP. Generate URL, App download link, Email, Contact, MeCard, vCard, and Phone Bar code with PHP.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generate QR Code Dynamically using PHP - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"PHP QR Code generator script - Create QR code dynamically using PHP. Example code to generate QR code image in PHP. Generate URL, App download link, Email, Contact, MeCard, vCard, and Phone Bar code with PHP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-06T05:04:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-06T05:06:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/11\/generate-qr-code-dynamically-using-php-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Generate QR Code Dynamically using PHP\",\"datePublished\":\"2023-11-06T05:04:48+00:00\",\"dateModified\":\"2023-11-06T05:06:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/\"},\"wordCount\":697,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/generate-qr-code-dynamically-using-php-codexworld.png\",\"keywords\":[\"Library\",\"PHP\",\"QR\",\"QR Code\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/\",\"name\":\"Generate QR Code Dynamically using PHP - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/generate-qr-code-dynamically-using-php-codexworld.png\",\"datePublished\":\"2023-11-06T05:04:48+00:00\",\"dateModified\":\"2023-11-06T05:06:27+00:00\",\"description\":\"PHP QR Code generator script - Create QR code dynamically using PHP. Example code to generate QR code image in PHP. Generate URL, App download link, Email, Contact, MeCard, vCard, and Phone Bar code with PHP.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/generate-qr-code-dynamically-using-php-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/generate-qr-code-dynamically-using-php-codexworld.png\",\"width\":1920,\"height\":1080,\"caption\":\"generate-qr-code-dynamically-using-php-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/generate-qr-code-dynamically-using-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate QR Code Dynamically using PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generate QR Code Dynamically using PHP - CodexWorld","description":"PHP QR Code generator script - Create QR code dynamically using PHP. Example code to generate QR code image in PHP. Generate URL, App download link, Email, Contact, MeCard, vCard, and Phone Bar code with PHP.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/","og_locale":"en_US","og_type":"article","og_title":"Generate QR Code Dynamically using PHP - CodexWorld","og_description":"PHP QR Code generator script - Create QR code dynamically using PHP. Example code to generate QR code image in PHP. Generate URL, App download link, Email, Contact, MeCard, vCard, and Phone Bar code with PHP.","og_url":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2023-11-06T05:04:48+00:00","article_modified_time":"2023-11-06T05:06:27+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/11\/generate-qr-code-dynamically-using-php-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Generate QR Code Dynamically using PHP","datePublished":"2023-11-06T05:04:48+00:00","dateModified":"2023-11-06T05:06:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/"},"wordCount":697,"commentCount":0,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/11\/generate-qr-code-dynamically-using-php-codexworld.png","keywords":["Library","PHP","QR","QR Code"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/","url":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/","name":"Generate QR Code Dynamically using PHP - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/11\/generate-qr-code-dynamically-using-php-codexworld.png","datePublished":"2023-11-06T05:04:48+00:00","dateModified":"2023-11-06T05:06:27+00:00","description":"PHP QR Code generator script - Create QR code dynamically using PHP. Example code to generate QR code image in PHP. Generate URL, App download link, Email, Contact, MeCard, vCard, and Phone Bar code with PHP.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/11\/generate-qr-code-dynamically-using-php-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/11\/generate-qr-code-dynamically-using-php-codexworld.png","width":1920,"height":1080,"caption":"generate-qr-code-dynamically-using-php-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/generate-qr-code-dynamically-using-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Generate QR Code Dynamically using PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/11\/generate-qr-code-dynamically-using-php-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-1r5","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/5523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=5523"}],"version-history":[{"count":3,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/5523\/revisions"}],"predecessor-version":[{"id":5527,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/5523\/revisions\/5527"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/5526"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=5523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=5523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=5523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}