Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <script>
- [...]
- // Alerta
- alert('Olá!');
- [...]
- </script>
- </body>
- </html>
- $html = explode(PHP_EOL, file_get_contents('https://example.com/'));
- foreach($html as $linha) {
- if(substr($linha, 0, 2) !== '//' && mb_substr($linha, 0, 2) !== '//') {
- $linhas[] = trim($linha);
- }
- }
- $html = implode(PHP_EOL, $linhas);
Add Comment
Please, Sign In to add comment