I want to get some website source code into webpage as result using php.
Here is my html code.i want to add php code to checkout website source code as result.
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<center>
<form method="post">
<h1>Website source code</h1>
<input type="text" name="url" placeholder="Website Url"><input type="submit" value=">>">
</form>
</center>
</body>
</html>
Here is my php code to export html source code.
[[-- <?php $all_lines = file('example.com/');
foreach ($all_lines as $line_num => $line) {
echo "Code.-{$line_num}: " . htmlspecialchars($line) . "\n";
} ?> --]] –