For example, I ask Baidu, I want to know that this time a total request for those resources, including pictures, js,css, but do not want to file_get_content later take these and then use regular analysis, there is a better way?
Reply content:
For example, I ask Baidu, I want to know that this time a total request for those resources, including pictures, js,css, but do not want to file_get_content later take these and then use regular analysis, there is a better way?
There is no such method. Maybe you can find a well-packaged object to complete your needs, but the inside of this object must also be counted by parsing the string.
In fact, thinking about it, your intentions are not logical in themselves. What about the browser, not the first to get the HTML source code, and then go through the line, so that one by one request CSS, JS, image and other resources? This is the logic that conforms to the law of things, it is like asking you how many layers of a building, the only way is to count, perhaps some instruments can be calculated, but the principle of the instrument is also a layer of the number.
The program is built on the basis of logic, the development of the function can be done without others to build the wheel, but does not mean that you can erase the wheel of the logic represented.
Either way, do a little bit of work.
Recommended use of Simplehtmldom