how to timeout $doc = new DOMDocument()->load($url)

Posted on 16th Feb 2014 by admin

I am currently using this $doc->load($url) to fetch an rss feed.
If a feed takes long than 20 seconds to download, I wish to terminate it and proceed to the next, is there any way of terminating this??

Code: Reference
$doc = new DOMDocument();

Other forums