I am currently working on a URL, which encodes the URL entered by URL variable. The user is then redirected to http://example.net/?enc_url=THE ENCODED LINK
.
This is my previous code:
<!DOCTYPE html>
<html>
<script type="text/javascript">
setTimeout(function() {
var uri = <?php echo $_GET["url"]; ?>
var res = encodeURI(uri)
location.href = 'http://example.com"/?enc_url={$res}'
}
</script>
</html>
Please help me, but remember that I do not have much experience with PHP yet. Thanks for any help!
Greetings!