0

What is the best practice to find all links of an external website? I had a look around and it seems JavaScript along cannot scrape external sites because of the same origin policy. With PHP I can easily get a website's content with the file_get_contents() function but how do I extract links only? Do I need to write a regex or is there any other, better way of doing this?

Charles Ingalls
  • 4,521
  • 5
  • 25
  • 33

0 Answers0