Is there a PHP class like JavaScript that controls DOM models in HTML? I recommend a class that finds HTMLSQL, which has good functions. Unfortunately, I feel that the author is making the function fancy and complicated. To implement such a function. $ Bodyfile_get_content (www.4wei.cn); $ titledom (title); $ divdom ()-& gt; tag (div)-& is there any PHP class like JavaScript to manipulate DOM models in HTML?
At present, I have found an html SQL class with good functions. Unfortunately, I feel that the author is making the function fancy and complicated.
To implement such a function.
$ Body = file_get_content (http://www.4wei.cn );
$ Title = dom ('title ');
$ P = dom ()-> tag ('P')-> id ('My _ p_id ');
$ Class = $ p-> class;
$ Input = dom ()-> form ('My _ form')-> tag ('input')-> name ('name ');
$ Input-> value;
This feature.
------ Solution --------------------
Help you top
------ Solution --------------------
Built-in DOMDocument class
------ Solution --------------------
Look up.
------ Solution --------------------
Discussion
Find an html dom class, which is almost what I want.
PHP Simple html dom Parser
Http://simplehtmldom.sourceforge.net/manual.htm
------ Solution --------------------
PhpQuery
------ Solution --------------------
Thanks for sharing ~
------ Solution --------------------
Mark
------ Solution --------------------
PHP Simple html dom Parser is good,
However, note that it is prone to memory problems. after an object is used up, it must explicitly call its _ destruct function.