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


Posted on 16th Feb 2014 07:03 pm 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
Did you know?Explore Trending and Topic pages for more stories like this.
$doc = new DOMDocument();
No comments posted yet

Your Answer:

Login to answer
192 Like 13 Dislike
Previous forums Next forums
Other forums

Generating unique numbers using php
Hi,
I need help in generating unique number using php.I tired using rand() in php.But, by using r

Variable Clash
In the past I've had variables clash. For example:

Code: <?php
$c = 5;
$ca

need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana

Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" '

Code: [Select]preg_

Problems with returning true or false in eval()'d code
Hi guys,

Would appreciate some help with a problem when running eval() on a function that sho

PHP and Javascript
Hi Guys,

Im trying to load the contents of an html file into a text area for editing, this is

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

Detail Expenses Report by Cost Center
I would like to obtain a report out of SAP that shows a list of expenses by cost center that shows t

Insert numbers from Barcode scanner into online php page
I have a real big problem, Here is what I'm trying to do. I have a Intermec CN3 handheld computer th

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash