<meta http-equiv= "Content-type" content= "text/html;charset=gb2312"/>
<title> Latest News </title>
<style>
Body {
Background: #000000;
padding:10px;
font-size:12px;
margin:10px;
Text-align:center;
}
#main {
Background: #8B9C0D;
width:900px;
margin:0px Auto;
}
. mleft,.mmid,.mright {
Float:left;
}
. mleft,.mright {
Background: #ABCDEF;
width:300px;
Float:left;
}
. mmid {
Background: #FECDBA;
width:300px;
Float:left;
}
#footer {
Background: #EB5566;
height:80px;
margin:0px Auto;
width:900px;
}
A
Display:block;
Text-align:left;
}
a:hover {
font-size:13px;
Color: #FF0000;
}
a:visited {
Color: #000000;
Background: #FFC080;
}
</style>
<body>
<div id= "Main" >
<div class= "Mleft" >
<?php
$str = file_get_contents ("http://news.163.com/rank/");
Preg_match_all ("#<div class=" S3 ">
for ($i =0; $i <count ($match [0]); $i + +)
{
echo "Tttt". Preg_replace ("# (<div.*h6>) (. *) (}
?>
</div>
<div class= "Mmid"
<?php
$str = file_get_contents ("http ://news.sina.com.cn/hotnews/");
Preg_match_all ("#<span style= ' padding-left:6px ' > (. *) </span></td> #i", $str, $match);
for ($i =0; $i <count ($match [0]); $i + +)
{
echo "Tttt". Preg_replace ("#<span style= ' Padding-left : 6px ' > (. *) </span></td> #i "," \1 ", $match [0][$i])." n ";
}
</div>
<div class= "Mright" >
<?php
$str = file_get_contents ("http://news.qq.com/paihang.htm");
Preg_match_all ("#<td align=" left "class=" left "> (. *) </td> #i", $str, $match);
for ($i =0; $i <count ($match [0]); $i + +)
{
echo "Tttt". Preg_replace ("#<td align=" left "class=" left "> (. *) </td> #i", "\1", $match [0][$i]). " n ";
}
?>
</div>
</div>
<div id= "Footer" ></div>
</body>