Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save banksy89/2788310 to your computer and use it in GitHub Desktop.
Save banksy89/2788310 to your computer and use it in GitHub Desktop.
PHP - Source code of website
function getSourceCode ( $website )
{
// The link to the website
$code_lines = file ( 'http://webite.com' );
// Loop through the code and build string
foreach ( $code_lines as $line => $code )
$lines .= "<strong>{$line}. </strong> " . htmlspecialchars( $code ) . "</ br>\n";
return $lines;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment