I’d like to know how to download an image asynchronously.
Using: Codeigniter, JQuery.
Background:
We have a web where user can post URLs.
Given a URL we will:
– Fetch and prase the HTML to extract img urls (using simple_html_dom)
– Download these images (if any) in our server (curl).
– Publish the post done by the user.
– Redirect user to the post published.
Issue:
Download images could take a while, and we dont want to block the user there.
Need:
There is any way to post the thread and allow the user navigate normally while we are downloading the images asynchronically since we don’t need the images to appear in the post.
Thanks
On your PHP script,
ignore_user_aborthttp://php.net/ignore_user_abort