Home > php教程 > PHP源码 > php制作2012伦敦残奥会奖牌榜

php制作2012伦敦残奥会奖牌榜

PHP中文网
Release: 2016-05-25 17:10:09
Original
1429 people have browsed it

1. [代码][PHP]代码    

<?php
define(&#39;SINA_SAE&#39;, &#39;0&#39;); //是否启用新浪SAE平台1为使用0为不使用
$ayurl="http://2012.163.com/special/cawqjp/";
$content=fcontents($ayurl);
preg_match_all(&#39;|<p class=\"area area_bg1\">(.*)<p class=\"channel-end\">|isU&#39;,$content,$table);
echo &#39;
<html lang="zh-CN" xml:lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>残奥会奖牌榜_2012伦敦残奥会奖牌榜</title>
<meta name="description" content=最新,最准确,最专业,最权威的2012伦敦残奥会奖牌榜。" />
<meta name="keywords" content="伦敦奥运奖牌榜,金牌榜,中美争霸,爱美丽网,残奥会奖牌榜,2012伦敦残奥会" />
<style>
@charset "gb2312";
.area{
       color:#2B2B2B;
       margin:0 auto;
       text-align:left;
       width:960px;
      }
 p.ab{
      position:relative;
      z-index:100;
      overflow:visible;
      }
 .calendarMain{
       background:#fff;
       clear:both;display:none;
       border:1px solid #ccc;
       height:207px;
       width:175px;
       position:absolute;
       z-index:2;
       left:535px;
       top:27px;
     }
.calendarMain .selectDate{
      clear:both;
      float:left;
      height:31px;
      line-height:31px;
      text-align:center;
      width:175px;
    }
.calendarMain .selectDate a,.calendarMain .selectDate a:visited{color:#333;}
#preMonth{
    padding-right:7px;
    }
#nextMonth{
     padding-left:7px;
     }
.calendarMain .title{
    float:left;width:175px;
    height:25px;
    clear:both;
    background:#02A9FF;
    text-align:center;
    color:#fff;
  }
.calendarMain .title li{
     float:left;
     width:25px;
     line-height:25px;
     font-weight:bold;
     font-size:12px;
  }
.calendarMain .title .endweek{
        color:#ffda7f;
      }
.calendarMain .list{
      float:left;
      width:175px;
      height:25px;
      clear:both;
   }
.calendarMain .list li{
         float:left;
         width:24px;
         text-align:left;
         line-height:25px;
         height:25px;
         display:inline;
         margin:0 1px 1px 0;
         background:#f6f6f6;
      }
.calendarMain .list li a{
       display:block;
       width:24px;
       text-align:center;
       line-height:25px;
       height:25px;
       background:#f6f6f6;
   }
.calendarMain .list li a:hover{
      background:#02A9FF;
      color:#fff;
      text-decoration:none;
   }
.sec-nav{
     padding-top:2px;
     height:29px;
     width:960px;
     margin:0 auto;
     background:#F0F0F0;
     line-height:31px;
     overflow:hidden;
   }
.sec-nav a,.sec-nav a:visited{
       color:#717070;
     }
.menu5{
        z-index:100;
        position:absolute;
        display:none;
        width:456px;
        border:#ccc 1px solid;
        background:#F2F2F2;
        top:2px;left:0;
        padding:28px 0 0 0;
      }
.menu5 a,.menu5 a:visited{
       float:left;
       display:inline;
       height:26px;
       width:90px;
       margin:0 0 1px 1px;
       background:#E7E7E7;
       color:#333;
       text-align:center;
       line-height:26px;
     }
.menu5 a:hover{
       color:#fff;
       text-decoration:none;
       background:#02A9FF;
     }
.menu5 .sec-nav-btn{
      position:absolute;
      top:-1px;left:-1px;
      background:url(qbxm_h.png) no-repeat scroll left top transparent;
      width:100px;height:29px;
   }
.sec-nav-btn{
        width:89px;
        height:25px;
        cursor:pointer;
        font-weight:bold;
        line-height:27px;
        color:#FEFEFE;
        text-indent:10px;
      }
.ab .sec-nav .qbxm{
      background:url(qbxm.png) left top no-repeat;
      width:535px;
    }
.wqhg{
        background:url(wqhg.png) left top no-repeat;
     }
</style>

<p class="area area_bg1">&#39;.$table[1][0].&#39;
<p align="center"><a href="
 
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src=\&#39;" + _bdhmProtocol + "hm.baidu.com/h.js%3F14be499358383bc5a422ceab62afe0f6\&#39; type=\&#39;text/javascript\&#39;%3E%3C/script%3E"));
</script>&#39;;
function fcontents($a){//获取内容
if(SINA_SAE){
	$f = new SaeFetchurl();
	$content = $f->fetch($a);
	if($f->errno() == 0)  $r=$content;
	else $r=$f->errmsg();
}else{$r=@file_get_contents($a);}
return $r;
}?>
Copy after login

                   


                   

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template