{
    "id": 92,
    "date": "2024-10-26T22:25:43",
    "date_gmt": "2024-10-26T22:25:43",
    "guid": {
        "rendered": "https:\/\/m7lauhbiqx.onrocket.site\/?page_id=303"
    },
    "modified": "2024-10-26T22:25:43",
    "modified_gmt": "2024-10-26T22:25:43",
    "slug": "qr-scan",
    "status": "publish",
    "type": "page",
    "link": "https:\/\/koshk.net\/en\/qr-scan\/",
    "title": {
        "rendered": "QR Scan"
    },
    "content": {
        "rendered": "<div class=\"ticket-verification-container\">\n\n            <div id=\"verification-result\" class=\"ticket-verification-result\">\n                            <\/div>\n            <div id=\"scanner-container\" style=\"display: none;\">\n                <video id=\"qr-video\" style=\"width: 100%; max-width: 500px;\"><\/video>\n                <canvas id=\"qr-canvas\" style=\"display: none;\"><\/canvas>\n            <\/div>\n            <a href=\"#\" class=\"qr-code-scan-btn\" id=\"start-scanner\">\n                <img decoding=\"async\" src=\"https:\/\/koshk.net\/wp-content\/plugins\/listeo-core\/assets\/images\/listeo_qr.svg\" \/>\n                <span>Click to Open QR Code Scanner<\/span>\n            <\/a>\n\n            <div id=\"debug-info\" style=\"display:none; margin-top: 20px; padding: 10px; background-color: #f0f0f0;\"><\/div>\n        <\/div>\n\n        <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/jsqr@1.3.1\/dist\/jsQR.min.js\"><\/script>\n        <script>\n            document.addEventListener('DOMContentLoaded', function() {\n                const video = document.getElementById('qr-video');\n                const canvas = document.getElementById('qr-canvas');\n                const ctx = canvas.getContext('2d');\n                const startButton = document.getElementById('start-scanner');\n                const scannerContainer = document.getElementById('scanner-container');\n                const resultDiv = document.getElementById('verification-result');\n\n                const debugInfo = document.getElementById('debug-info');\n                let scanning = false;\n                let stream = null;\n\n                function log(message) {\n                    console.log(message);\n                    debugInfo.innerHTML += message + '<br>';\n                }\n\n                startButton.addEventListener('click', function() {\n                    if (scanning) {\n                        stopScanner();\n                    } else {\n                        startScanner();\n                    }\n                });\n\n                function startScanner() {\n                    if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {\n                        log('Sorry, your browser doesn\\'t support accessing the camera.');\n                        return;\n                    }\n\n                    navigator.mediaDevices.getUserMedia({\n                            video: {\n                                facingMode: \"environment\"\n                            }\n                        })\n                        .then(function(mediaStream) {\n                            log('Camera access granted');\n                            scanning = true;\n                            stream = mediaStream;\n                            startButton.textContent = 'Stop Scanner';\n                            scannerContainer.style.display = 'block';\n                            video.srcObject = stream;\n                            video.setAttribute(\"playsinline\", true);\n                            video.play();\n                            requestAnimationFrame(tick);\n                        })\n                        .catch(function(err) {\n                            log('Error accessing the camera: ' + err.message);\n                        });\n                }\n\n                function stopScanner() {\n                    log('Stopping scanner');\n                    scanning = false;\n                    startButton.textContent = 'Start Scanner';\n                    scannerContainer.style.display = 'none';\n                    if (stream) {\n                        stream.getTracks().forEach(track => track.stop());\n                        stream = null;\n                    }\n                    video.srcObject = null;\n                }\n\n                function tick() {\n                    if (scanning) {\n                        if (video.readyState === video.HAVE_ENOUGH_DATA) {\n                            canvas.height = video.videoHeight;\n                            canvas.width = video.videoWidth;\n                            ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n                            var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n                            var code = jsQR(imageData.data, imageData.width, imageData.height, {\n                                inversionAttempts: \"dontInvert\",\n                            });\n                            if (code) {\n                                log(\"Found QR code: \" + code.data);\n                                stopScanner();\n                                window.location.href = code.data; \/\/ Automatically redirect to the URL in the QR code\n                            }\n                        }\n                        requestAnimationFrame(tick);\n                    }\n                }\n\n                function verifyTicket(url) {\n                    const verifyParam = new URL(url).searchParams.get('verify');\n                    if (verifyParam) {\n                        log('Verifying ticket: ' + verifyParam);\n                        window.location.href = url; \/\/ Redirect to the verification URL\n                    } else {\n                        resultDiv.innerHTML = '<p>Invalid QR code. Please try again.<\/p>';\n                    }\n                }\n\n                window.addEventListener('unload', stopScanner);\n            });\n        <\/script>\n        \n\n\n\n<p class=\"wp-block-paragraph\"><\/p>",
        "protected": false
    },
    "excerpt": {
        "rendered": "",
        "protected": false
    },
    "author": 1,
    "featured_media": 0,
    "parent": 0,
    "menu_order": 0,
    "comment_status": "closed",
    "ping_status": "closed",
    "template": "template-dashboard.php",
    "meta": {
        "footnotes": ""
    },
    "class_list": [
        "post-92",
        "page",
        "type-page",
        "status-publish",
        "hentry"
    ],
    "acf": [],
    "pure_taxonomies": [],
    "yoast_head": "<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>QR Scan - KOSHK | Making Further Possible<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/koshk.net\/en\/qr-scan\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"QR Scan - KOSHK | Making Further Possible\" \/>\n<meta property=\"og:url\" content=\"https:\/\/koshk.net\/en\/qr-scan\/\" \/>\n<meta property=\"og:site_name\" content=\"KOSHK | Making Further Possible\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/gokoshk\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/koshk.net\/wp-content\/uploads\/2025\/09\/Beige-Brown-Modern-Aesthetic-Elegant-Interior-Design-Facebook-Cover-1024x577.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"577\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/koshk.net\\\/qr-scan\\\/\",\"url\":\"https:\\\/\\\/koshk.net\\\/qr-scan\\\/\",\"name\":\"QR Scan - KOSHK | Making Further Possible\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/koshk.net\\\/#website\"},\"datePublished\":\"2024-10-26T22:25:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/koshk.net\\\/qr-scan\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/koshk.net\\\/qr-scan\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/koshk.net\\\/qr-scan\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/koshk.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"QR Scan\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/koshk.net\\\/#website\",\"url\":\"https:\\\/\\\/koshk.net\\\/\",\"name\":\"KOSHK | Making Further Possible\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/koshk.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/koshk.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/koshk.net\\\/#organization\",\"name\":\"KOSHK | Making Further Possible\",\"url\":\"https:\\\/\\\/koshk.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/koshk.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"http:\\\/\\\/koshk.net\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/Koshk-logo-2-300x300-1.jpg\",\"contentUrl\":\"http:\\\/\\\/koshk.net\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/Koshk-logo-2-300x300-1.jpg\",\"width\":300,\"height\":300,\"caption\":\"KOSHK | Making Further Possible\"},\"image\":{\"@id\":\"https:\\\/\\\/koshk.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/gokoshk\\\/\",\"https:\\\/\\\/www.instagram.com\\\/gokoshk\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->",
    "yoast_head_json": {
        "title": "QR Scan - KOSHK | Making Further Possible",
        "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:\/\/koshk.net\/en\/qr-scan\/",
        "og_locale": "en_US",
        "og_type": "article",
        "og_title": "QR Scan - KOSHK | Making Further Possible",
        "og_url": "https:\/\/koshk.net\/en\/qr-scan\/",
        "og_site_name": "KOSHK | Making Further Possible",
        "article_publisher": "https:\/\/www.facebook.com\/gokoshk\/",
        "og_image": [
            {
                "width": 1024,
                "height": 577,
                "url": "https:\/\/koshk.net\/wp-content\/uploads\/2025\/09\/Beige-Brown-Modern-Aesthetic-Elegant-Interior-Design-Facebook-Cover-1024x577.png",
                "type": "image\/png"
            }
        ],
        "twitter_card": "summary_large_image",
        "schema": {
            "@context": "https:\/\/schema.org",
            "@graph": [
                {
                    "@type": "WebPage",
                    "@id": "https:\/\/koshk.net\/qr-scan\/",
                    "url": "https:\/\/koshk.net\/qr-scan\/",
                    "name": "QR Scan - KOSHK | Making Further Possible",
                    "isPartOf": {
                        "@id": "https:\/\/koshk.net\/#website"
                    },
                    "datePublished": "2024-10-26T22:25:43+00:00",
                    "breadcrumb": {
                        "@id": "https:\/\/koshk.net\/qr-scan\/#breadcrumb"
                    },
                    "inLanguage": "en-US",
                    "potentialAction": [
                        {
                            "@type": "ReadAction",
                            "target": [
                                "https:\/\/koshk.net\/qr-scan\/"
                            ]
                        }
                    ]
                },
                {
                    "@type": "BreadcrumbList",
                    "@id": "https:\/\/koshk.net\/qr-scan\/#breadcrumb",
                    "itemListElement": [
                        {
                            "@type": "ListItem",
                            "position": 1,
                            "name": "Home",
                            "item": "https:\/\/koshk.net\/"
                        },
                        {
                            "@type": "ListItem",
                            "position": 2,
                            "name": "QR Scan"
                        }
                    ]
                },
                {
                    "@type": "WebSite",
                    "@id": "https:\/\/koshk.net\/#website",
                    "url": "https:\/\/koshk.net\/",
                    "name": "KOSHK | Making Further Possible",
                    "description": "",
                    "publisher": {
                        "@id": "https:\/\/koshk.net\/#organization"
                    },
                    "potentialAction": [
                        {
                            "@type": "SearchAction",
                            "target": {
                                "@type": "EntryPoint",
                                "urlTemplate": "https:\/\/koshk.net\/?s={search_term_string}"
                            },
                            "query-input": {
                                "@type": "PropertyValueSpecification",
                                "valueRequired": true,
                                "valueName": "search_term_string"
                            }
                        }
                    ],
                    "inLanguage": "en-US"
                },
                {
                    "@type": "Organization",
                    "@id": "https:\/\/koshk.net\/#organization",
                    "name": "KOSHK | Making Further Possible",
                    "url": "https:\/\/koshk.net\/",
                    "logo": {
                        "@type": "ImageObject",
                        "inLanguage": "en-US",
                        "@id": "https:\/\/koshk.net\/#\/schema\/logo\/image\/",
                        "url": "http:\/\/koshk.net\/wp-content\/uploads\/2025\/07\/Koshk-logo-2-300x300-1.jpg",
                        "contentUrl": "http:\/\/koshk.net\/wp-content\/uploads\/2025\/07\/Koshk-logo-2-300x300-1.jpg",
                        "width": 300,
                        "height": 300,
                        "caption": "KOSHK | Making Further Possible"
                    },
                    "image": {
                        "@id": "https:\/\/koshk.net\/#\/schema\/logo\/image\/"
                    },
                    "sameAs": [
                        "https:\/\/www.facebook.com\/gokoshk\/",
                        "https:\/\/www.instagram.com\/gokoshk"
                    ]
                }
            ]
        }
    },
    "_links": {
        "self": [
            {
                "href": "https:\/\/koshk.net\/en\/wp-json\/wp\/v2\/pages\/92",
                "targetHints": {
                    "allow": [
                        "GET"
                    ]
                }
            }
        ],
        "collection": [
            {
                "href": "https:\/\/koshk.net\/en\/wp-json\/wp\/v2\/pages"
            }
        ],
        "about": [
            {
                "href": "https:\/\/koshk.net\/en\/wp-json\/wp\/v2\/types\/page"
            }
        ],
        "author": [
            {
                "embeddable": true,
                "href": "https:\/\/koshk.net\/en\/wp-json\/wp\/v2\/users\/1"
            }
        ],
        "replies": [
            {
                "embeddable": true,
                "href": "https:\/\/koshk.net\/en\/wp-json\/wp\/v2\/comments?post=92"
            }
        ],
        "version-history": [
            {
                "count": 0,
                "href": "https:\/\/koshk.net\/en\/wp-json\/wp\/v2\/pages\/92\/revisions"
            }
        ],
        "wp:attachment": [
            {
                "href": "https:\/\/koshk.net\/en\/wp-json\/wp\/v2\/media?parent=92"
            }
        ],
        "curies": [
            {
                "name": "wp",
                "href": "https:\/\/api.w.org\/{rel}",
                "templated": true
            }
        ]
    }
}