Getting all links from a domain

Discussion in 'PHP' started by sm9ai, Oct 30, 2007.

  1. #1
    I would like to write a script to get all the links within a domain.

    However I don't really know where to start. Searching through text for links might work however it could get stuck in loops.

    Ideally I would like to grab all the urls on a google site:yourdomain.com search but how would I do that?

    Any ideas or pointers?
     
    sm9ai, Oct 30, 2007 IP
  2. theOtherOne

    theOtherOne Well-Known Member

    Messages:
    112
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Grabbing every link from the texts would work very well... you would have to store every page you already indexed into an array so you don't result in loops.

    If you want to use Google data you might need to use the Google API from http://code.google.com/ , since directly grabbing the content from google.com search results is not allowed. ;)
     
    theOtherOne, Oct 30, 2007 IP