I’m trying to make a page where you type in a url and it opens the url, but then appends the page content to the tab. So far my js code is this:
<script>
var url = "<?php echo $_GET['url']; ?>";
var tab = window.open(url, "_blank");
tab.appendChild("<?php echo file_get_contents($_GET['url']); ?>");
</script>
Based on what I understand, it should open the requested page, then append the code to the page. Any help would be much appreciated, thank you.
New contributor
mrC0der is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.