PHP头条
热点:

PHP读取网页文件


<?php

$handle = fopen ("http://www.example.com/", "rb");

$contents = "";

while (!feof($handle)) { 

$contents .= fread($handle, 8192);

}

fclose($handle);

?>

<?php// 对 PHP 5 及更高版本

$handle = fopen("http://www.example.com/", "rb");

$contents = stream_get_contents($handle);

fclose($handle);

?>

直接上代码了,学技术的,你会懂得

<好东西大家一起吃哦,有好的方法别忘了告诉我一声>

 

www.phpzy.comtrue/phprm/22666.htmlTechArticlePHP读取网页文件 ?php $handle = fopen ("http://www.example.com/", "rb"); $contents = ""; while (!feof($handle)) { $contents .= fread($handle, 8192); } fclose($handle); ? ?php// 对 PHP 5 及更高版本 $handle = fopen("http://www.exam...

相关文章

    暂无相关文章

PHP之友评论

今天推荐