Q:

Write a PHP script to display source code of a webpage (e.g. "https://www.nerdutella.com/")

0

Write a PHP script to display source code of a webpage (e.g. "https://www.nerdutella.com/").

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
$all_lines = file('https://www.nerdutella.com/');
foreach ($all_lines as $line_num => $line)
 {
 	echo "Line No.-{$line_num}: " . htmlspecialchars($line) . "\n";
 }
?>

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now