Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === 0 ? 'https://' : 'http://';
- $url = $protocol.$_SERVER['SERVER_NAME'].'/FallaGassrini/';
- $html = file_get_contents($url);
- $dom = new DOMDocument;
- @$dom->loadHTML($html);
- $links = $dom->getElementsByTagName('a');
- echo "<pre>";
- foreach ($links as $link){
- //echo $link->nodeValue;
- echo $url.$link->getAttribute('href'), '<br>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement