<!-- Insert iframe with the desired page -->
    <iframe id="myIframe" src="" frameborder="0" scrolling="yes"></iframe>

    <script>
        window.onload = function() {
            // Get the URL parameters
            const urlParams = new URLSearchParams(window.location.search);
            const id = urlParams.get('id');

            // Get the iframe element
            var iframe = document.getElementById('myIframe');

            // Fetch the key from the JSON file
            var xhr = new XMLHttpRequest();
            xhr.open('GET', 'https://nfsfree.wuaze.com/key.json', true);
            xhr.onload = function() {
                if (xhr.status === 200) {
                    var data = JSON.parse(xhr.responseText);

                    // Set the iframe src dynamically based on the 'id' parameter
                    if (id) {
                        iframe.src = 'https://nfsfree.wuaze.com/' + data.key + '.php?id=' + id; // Corrected here
                    }

                    // Set iframe height to the full window height
                    iframe.style.height = window.innerHeight + 'px';
                } else {
                    console.error('Failed to fetch key.json: ' + xhr.status);
                }
            };

            xhr.onerror = function() {
                console.error('Request failed');
            };

            xhr.send();
        };
    </script>