Web Analytics Made Easy -
StatCounter Crawler file downloading? - CodingForum


No announcement yet.

Crawler file downloading?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Crawler file downloading?

    Hi, I am trying to write some code that will go through a website and when it finds a link to some sort of download (some type of file) it will send some info about that to a database. All I can think of is doing a file_get_contents('www.website.com'); to get the web pages info into a string and then write code for each individual kind of file it might come across (which is a whole lot) and make it send info to a database when it finds one of them. With the preg_match and the search string functions (substr, strpos etc) it feels like there should be an easier/different (better?) way to go about this? Thanks much.