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

后端 未结 9 1780
独厮守ぢ
独厮守ぢ 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 08:53

    Just returning a 200 response is not enough; many valid links will continue to return "200" after they change into porn / gambling portals when the former owner fails to renew.

    Domain squatters typically ensure that every URL in their domains returns 200.

提交回复
热议问题