Jump to content

How to get and display all the website links from a website in PHP?


angel1987

Recommended Posts

I tried searching on google but couldn't find any relevant information, please redirect me to relevant source or help me with the code.

 

I want to pass a domain name in text field which will be scanned and then the script will display entire site map.

 

Not external links or links on a page. Sorry it is not easy for me to explain.

 

Eg. if i pass abc.com

 

Script will display

 

abc.com/12/adn.php

abc.com/asd/asd/

etc

 

Whatever their url format is.

 

All the links on that domain.

But how will screen scraping give all the links associated with that domain name on that website?

 

I searched on google but every article talks about fetching a part of the content on a web page from the website.

 

I think i need to do something like a xml site map generator where it crawls website and displays all the links.

 

Any tutorial for that?

Sorry. I thought you wanted to grab the links from the pages themselves. If you want to do a site search for links, there is probably a way to do a customized search from google, but I don't know how, exactly. Anybody else here know?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.