How do I check for valid (not dead) links programmatically using PHP?

后端 未结 9 1800
独厮守ぢ
独厮守ぢ 2020-12-08 08:24

Given a list of urls, I would like to check that each url:

  • Returns a 200 OK status code
  • Returns a response within X amount of time

The

9条回答
  •  醉话见心
    2020-12-08 09:12

    Look into cURL. There's a library for PHP.

    There's also an executable version of cURL so you could even write the script in bash.

提交回复
热议问题