title: Best way to manage long-running php script?
body: <p>I have a PHP script that takes a long time (5-30 minutes) to complete. Just in case it matters, the script is using curl to scrape data from another server. This is the reason it's taking so long; it has to wait for each page to load before processing it and moving to the next.</p>
  
  <p>I want to be able to initiate the script and let it be until it's done, which will set a flag in a database table.</p>
  
  <p>What I need to know is how to be able to end the http request before the script is finished running. Also, is a php script the best way to do this?</p>