欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

个人站长制做网页常用的php代码

程序员文章站 2023-02-24 19:33:46
复制代码 代码如下:
复制代码 代码如下:

<?php 
$str = file("http://tq.tom.com/china/index.html"); 
$count = count($str); 
for ($i=0;$i<$count;$i++){  
    $file .= $str[$i]; 

$tomtq = explode("<table width=\"774\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\" bgcolor=\"#ababab\">",$file); 
$tomtq = explode("</table>",$tomtq[1]); 
$tomtq= $tomtq[0]; 
//$tomtq tom天气小偷 
?> 


天气预报 code来的





[ctrl+a 全选 注:如需引入外部js需刷新才能执行]