Posted By

onefastsnail on 05/24/12


Tagged


Versions (?)

get html source


 / Published in: Other
 

  1. <?php // display source code
  2. $lines = file('http://google.com/'); // pick teh url
  3. foreach ($lines as $line_num => $line) {
  4. // loop thru each line and prepend line numbers
  5. echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br>\n";
  6. }
  7. ?>

Report this snippet  

You need to login to post a comment.