title: How do I check for valid (not dead) links programmatically using PHP?
body: <p>Given a list of urls, I would like to check that each url:</p>
  
  <ul>
  <li>Returns a 200 OK status code</li>
  <li>Returns a response within X amount of time</li>
  </ul>
  
  <p>The end goal is a system that is capable of flagging urls as potentially broken so that an administrator can review them.</p>
  
  <p>The script will be written in PHP and will most likely run on a daily basis via cron.</p>
  
  <p>The script will be processing approximately 1000 urls at a go.</p>
  
  <p>Question has two parts:</p>
  
  <ul>
  <li>Are there any bigtime gotchas with an operation like this, what issues have you run into?</li>
  <li>What is the best method for checking the status of a url in PHP considering both accuracy and performance?</li>
  </ul>