code_junkie

Web crawler links/page logic in PHP

Nov 12th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. Array {
  2. [url] => URL
  3. [desc] => DESCRIPTION
  4. }
  5.  
  6. foreach(DOMDocument::loadHTML($source)->getElementsByTagName('a') as $a)
  7. {
  8. $a->getAttribute('href');
  9. }
  10.  
  11. http://example.com
  12. //example.com/
Add Comment
Please, Sign In to add comment