抓取網站原始碼 PHP

-
更新於

<?php

$array = file('網址');

foreach ($array as $line_num => $html) {
//echo htmlspecialchars($html) . "<br />\n";
echo "{$line_num}&nbsp;&nbsp;&nbsp;".htmlspecialchars($html,ENT_QUOTES) . "<br />\n";
}
?>

此為  PHP原始碼,抓取網站原始碼且有 列出行數。


This entry was posted in PHP By .

About Weil Jimmer

avatar

Hi! Everyone! My name is Weil Jimmer. This is my personal blog. I'm a webmaster of this site. I hope the site will be popular. Now, Let's go! Enjoy gaining more knowledge.

This Post is NOT allowed to leave a reply