This article introduces how to use PHP code to obtain site description information, that is, the information in meta. Friends in need can refer to it.
PHP method to obtain meta site information, the code is as follows: <?php /** * @get_meta_tags函数的应用实例 * @获取站点描述信息 * @edit:bbs.it-home.org * */ // Header... header("Content-Type: text/html; charset=utf-8"); // Function Starts Here... function getInfo($URL){ $getInfo= get_meta_tags($URL); return $getInfo; } // URL... $URL = "http://bbs.it-home.org"; $_getInfo = getInfo($URL); // Print. echo "$URL <p>"; echo $_getInfo ["author"]."<p>"; echo $_getInfo ["keywords"]."<p>"; echo $_getInfo ["description"]."<p>"; echo $_getInfo ["robots"]."<p>"; ?> Copy after login |