读取NFO信息的php代码。
2006-02-17  作者:amao  同分类文章
description:
读取NFO信息的php代码。两个文件
PHP 代码:
<?php
$nfo 
=$_GET['nfo'];
$nfodata file_get_contents($nfo.".nfo");
require_once(
"nfo2html.php");
$nfodata nfo2html($nfodata);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>nfo file</title>
    <style type="text/css">
        @font-face {
            font-family: nfo;
            font-style:  normal;
            font-weight: normal;
            src: url(/nfo.eot);
        }
        .nfo {
            padding: 12px;
            font-family: nfo, courier new;
            font-size: 11px;
            line-height: 1em;
        }
    </style>
</head>
<body>
    <pre class="nfo"><?=str_replace(" """$nfodata)?></pre>
    <div class="nfo" style="background-color: #000; color: #fff"><?=str_replace(" ""<br />"str_replace(" ""&nbsp;"$nfodata))?></div>
</body>
</html>
__________________
nfo2html.php

PHP 代码:
<?php
/**
* NFO TO HTML
*
* Special thanks to ibic@9down
* @author: andot(andot@ujn.edu.cn) & legend(legendsky@hotmail.com)
* @link: http://www.ugia.cn/?p=55, http://www.ugia.cn/?p=49
* @description: convert .nfo file to html
* @version: 2.0
*/
/* Copyright 2005 andot & legend (email : andot@ujn.edu.cn & legendsky@hotmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
$conv_table = array(
/* 0*/ 0x00000x263a0x263b0x26650x2666,
/* 5*/ 0x26630x26600x20220x25d80x0000,
/* 10*/ 0x00000x26420x26400x00000x266b,
/* 15*/ 0x263c0x25ba0x25c40x21950x203c,
/* 20*/ 0x00b60x00a70x25ac0x21a80x2191,
/* 25*/ 0x21930x21920x21900x221f0x2194,
/* 30*/ 0x25b20x25bc0x00000x00000x0022,
/* 35*/ 0x00000x00000x00000x00000x0027,
/* 40*/ 0x00000x00000x00000x00000x0000,
/* 45*/ 0x00000x00000x00000x00000x0000,
/* 50*/ 0x00000x00000x00000x00000x0000,
/* 55*/ 0x00000x00000x00000x00000x0000,
/* 60*/ 0x003c0x00000x00000x00000x0000,
/* 65*/ 0x00000x00000x00000x00000x0000,
/* 70*/ 0x00000x00000x00000x00000x0000,
/* 75*/ 0x00000x00000x00000x00000x0000,
/* 80*/ 0x00000x00000x00000x00000x0000,
/* 85*/ 0x00000x00000x00000x00000x0000,
/* 90*/ 0x00000x00000x00000x00000x0000,
/* 95*/ 0x00000x00000x00000x00000x0000,
/*100*/ 0x00000x00000x00000x00000x0000,
/*105*/ 0x00000x00000x00000x00000x0000,
/*110*/ 0x00000x00000x00000x00000x0000,
/*115*/ 0x00000x00000x00000x00000x0000,
/*120*/ 0x00000x00000x00000x00000x0000,
/*125*/ 0x00000x00000x23020x00c70x00fc,
/*130*/ 0x00e90x00e20x00e40x00e00x00e5,
/*135*/ 0x00e70x00ea0x00eb0x00e80x00ef,
/*140*/ 0x00ee0x00ec0x00c40x00c50x00c9,
/*145*/ 0x00e60x00c60x00f40x00f60x00f2,
/*150*/ 0x00fb0x00f90x00ff0x00d60x00dc,
/*155*/ 0x00a20x00a30x00a50x20a70x0192,
/*160*/ 0x00e10x00ed0x00f30x00fa0x00f1,
/*165*/ 0x00d10x00aa0x00ba0x00bf0x2310,
/*170*/ 0x00ac0x00bd0x00bc0x00a10x00ab,
/*175*/ 0x00bb0x25910x25920x25930x2502,
/*180*/ 0x25240x25610x25620x25560x2555,
/*185*/ 0x25630x25510x25570x255d0x255c,
/*190*/ 0x255b0x25100x25140x25340x252c,
/*195*/ 0x251c0x25000x253c0x255e0x255f,
/*200*/ 0x255a0x25540x25690x25660x2560,
/*205*/ 0x25500x256c0x25670x25680x2564,
/*210*/ 0x25650x25590x25580x25520x2553,
/*215*/ 0x256b0x256a0x25180x250c0x2588,
/*220*/ 0x25840x258c0x25900x25800x03b1,
/*225*/ 0x03b20x03930x03c00x03a30x03c3,
/*230*/ 0x03bc0x03c40x03a60x03b80x2126,
/*235*/ 0x03b40x221e0x00f80x03b50x2229,
/*240*/ 0x22610x00b10x22650x22640x2320,
/*245*/ 0x23210x00f70x22480x00b00x00b7,
/*250*/ 0x02d90x221a0x207f0x00b20x25a0,
/*255*/ 0x00a0
);
/*
function nfo2html($str) {
global $conv_table;
for ($i = 0; $i < strlen($str); $i ++) {
$asc = ord($str[$i]);
$output .= ($conv_table[$asc]) ? "&#".$conv_table[$asc].";" : $str[$i];
}
return $output;
}
*/
function nfo2html($str) {
global 
$conv_table;
$str str_replace("&""&"$str);
for (
$i 0$i 256$i++) {
if (
$conv_table[$i] != 0) {
$str str_replace(chr($i), "&#".$conv_table[$i].";"$str);
}
}
return 
$str;
}
?>
__________________


相关
读取NFO信息的php代码。
zend studio 5.5 改为简体中文版的办法
shell sort (希尔排序)
PHP5盗链函数(referfile)
utf-8为什么在国外流行了
windows ssh客户端putty 简介
统计在线时间
PHP中的串行化变量和序列化对象
MySQL数据的导出和导入工具:mysqldump
适合少量php编译加密的方案