Obtain the webpage source code keyword and description in regular expressions. egg pain points: & lt; META & nbsp; NAME = "description" & nbsp; CONTENT = "Wall Street bond (bond.wswire.com) is the world's top bond website. It provides you with the fastest and most professional bond information in the global bond market and the round-the-clock bond financing, bond rating and quotation services. obtain the webpage source code keyword and description in regular expressions, egg hurts a little
Scenario 1:
Scenario 2:
Note: it may be case sensitive, and there is name, which is different from the content attribute [color = # FF6600]. [/color]
The younger brother tried to write it. he could only match one webpage and did not know what the problem was. Thank you!
Keyword:
1.preg_match("/
tmpHtml,$inarr);
2.preg_match("/
tmpHtml,$inarr2);
1.preg_match("/
tmpHtml,$inarr);
2.preg_match("/
tmpHtml,$inarr2);
Note: Some webpages can match and some cannot.
------ Solution --------------------
Isn't there a get_meta_tags function?
------ Solution --------------------
Reference:
Isn't there a get_meta_tags function?
+ 1, you can return an array of meta, and then extract the required