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.
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.
The problem is that I'm making the init call from an iPhone app, which doesn't like a request that takes so long. I want that initial request to be finished quickly.
So in summary, 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? (My server supports Ruby On Rails, Python, Perl, Curl<-not sure what this is referring to) Although I don't have any experience in the other languages.