Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, "http://foro.elhacker.net");
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- $response = curl_exec($curl);
- $document = new DOMDocument();
- @$document->loadHTML($response);
- $links = $document->getElementsByTagName("a");
- $href = array();
- foreach($links as $link){
- $node = $link->attributes->getNamedItem("href");
- if($node != NULL){
- $href[] = $node->nodeValue;
- }
- }
- print_r($href);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement