1. [代码][PHP] 代码
- <?php
- define('SINA_SAE', '0'); // 是否启用新浪 SAE 平台 1 为使用 0 为不使用
- $ayurl="http://2012.163.com/special/cawqjp/";
- $content=fcontents($ayurl);
- preg_match_all('|
- (.*)
- |isU',$content,$table);
- echo ''.$table[1][0].'
- var _bdhmProtocol = (("https:" == document.location.protocol) ? "https://" : "http://");
- document.write(unescape(""));
- script';
- 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;
- }?>
来源: https://www.php1.cn/detail/php-3c056df907.html