抓取網站原始碼 PHP
No Comments

更新於 2014-04-15 19:42:10

<?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 Weil Jimmer.

About Weil Jimmer

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.
More Details About Me : https://weils.net/profile.php


Leave a message.

Only the first 10 comment will show.