I am using loadHTMLFile()
to load remote site html page and do data extract by getelementsByName for
300 interation looping. The speed to grab the data for each time is really slow. So I try
to think whether I am using right function to do so.
There is alternative such as file_get_contents(url) and curl_setpos query. I want to know
Which is fastet method to grab 2 or 3 data from the remote site data for every iteration?
Why I have seen people sometimes using loadHTMlFile(), sometimes using curl_setpos, sometimes using
file_get_contents, what is different in term of program speed ?
If I switch back to file_get_contes($url), I need to do a loop to do a match to my data that will
cost execution time that is similar slow to getelementbtTagName by DOM, Is it Right ?
I also look curl_ method at http://www.phpfreaks.com/forums/index.php?topic=324412.0
but it doesn't tell me the advatnage of using curl_ . Could you provide this info ?
$dom = new DOMDocument();
/*$dom = file_get_contents($url2);*/