SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2000
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a function in php that will allow easy following of links or would I need to carry out string manipulation (i.e. do it manually) with strpos and substr e.t.c...

    The idea is to index different sites for the purposes of a search engine.....


    Thanks if you can help,

    Jason

  2. #2
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would probably have to be done with string manipulation - or a JavaScript - JavaScript uses a links[] array automatically populated by all the links on the page - things like the HREF attribute can be access this way if you know the name (or index number/order) of the link on the page.

  3. #3
    SitePoint Addict kunal's Avatar
    Join Date
    Oct 2000
    Posts
    307
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Couldnt you just read the whole page into one variable eg, $webapge. And then check for http:// or href= using Regular Expression?
    i dunno...

  4. #4
    SitePoint Zealot
    Join Date
    Jun 2000
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks - I just wanted to confirm there's no way other than good old fashioned string manipulation...


    Cheers,

    Jason

  5. #5
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by kunal
    Couldnt you just read the whole page into one variable eg, $webapge. And then check for http:// or href= using Regular Expression?
    Ack - I don't know too much about Regular Expressions, but that would probably be a big pain in the you-know-what.

  6. #6
    SitePoint Addict kunal's Avatar
    Join Date
    Oct 2000
    Posts
    307
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by TWTCommish


    Ack - I don't know too much about Regular Expressions, but that would probably be a big pain in the you-know-what.
    lol.. thats true when your new to it. But once you get used to it, its an awesome thing to use.
    i dunno...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •