网站又回来啦,哈哈....QQ:4049054

[置顶] 网站备案信息

[不指定 2009/02/25 16:48 | by 折雨 ]
蜀ICP备07501768号
不知道是程序问题还是怎么,官方查询不了,只好截图为证了(部分隐私信息屏蔽):

[置顶] 网站换空间了

[不指定 2008/04/14 14:20 | by 折雨 ]
网站换空间了,换了一家外国的,免费空间,虽然有广告,速度慢,但是人家提供的,不要钱,只要稳定就好了,等
以后条件好点了就去买个空间来用吧!国内的空间以前还是很快的,还是免费的,再次感谢承德互联(http://www.cd-dns.com)为我以前提供的空间!上次是Hosting is powered by Free Web Hosting (http://www.free-web-hosting.biz),不过已经被封ip了,这次这个不知道能用多久了!

哈哈,2009-03-25国内空间被水产了,只好搬到国外来了,http://www.e3b.org提供的

----------------------------哎,又换了,换得真勤快,空间老挂,没办法----------------------------

<script language="javascript">

function GetFlashHtml (movieName, flashUrl, width, height, mode, settings) {
                return ['<object id="', movieName, '" type="application/x-shockwave-flash" data="', flashUrl, '" width="', width, '" height="', height, '">',
                                        '<param name="wmode" value="', mode, '" />',
                                        '<param name="movie" value="', flashUrl, '" />',
                                        '<param name="quality" value="high" />',
                                        '<param name="menu" value="false" />',
                                        '<param name="allowScriptAccess" value="always" />',
                                        '<param name="flashvars" value="' + settings + '" />',
                                        '</object>'].join("");
                                        }
        document.getElementById("fdiv").innerHTML = GetFlashHtml("SSS", "slot.swf",760,400,"window","11,12");

        </script>

声明

[不指定 2009/06/10 17:08 | by 折雨 ]
声明:
    1.本人过去、现在以及将来都不认识楼主,且自古以来与楼主无利益关系。以上内容文字均不不懂是什么意思。
    2.楼主表述之事与本人无关,只是本着“看贴回贴,繁荣网络、利人利己”的原则,顺便赚3分。
    3. 本人在此留言均为网络上复制,用于检验本人电脑键盘录入、屏幕显示的机械、光电性能。并不代表本人局部或全部同意、支持或者反对楼主观点。
    4.人生有风险,入世需谨慎。本回贴不暗示、鼓励、支持或映射读者作出生活方式、工作态度、婚姻交友、子女教育的积极或消极判断。
    5. 如本人留言违反国家有关法律,请网络管理员及时删除本人跟贴。
    6. 因删贴不及时所产生的任何法律(包括宪法,加法、减法、乘法、除法、剑法、拳法、脚法、民法,刑法,书法,公检法,基本法,劳动法,婚姻法,输入法,没办法,国际法,今日说法,吸星大法,与台湾关系法及文中涉及或可能涉及以及未涉及之法,各地治安管理条例)纠纷或责任本人概不负责。
    7. 本人谢绝任何跨省追捕行为,如有需要请直接联系楼主、原作者以及网络管理员或法人代表。
    8. 此声明最终解释权归本人所有。

php的UTF-8中文拼音排序

[不指定 2009/06/08 11:31 | by 折雨 ]
关于网上的mysql按拼音查询的两种说法:
1. 用ORDER BY BINARY(字段) ASC的方式查询数据库
    实际上在纯UTF-8的环境下是实现不了了,只有用UTF-8的编码去保存GBK的字符之后才能这样使用,而且不能忘记替换像"窦"这种特殊的字哦……

2. 在数据库中新建一个字段,保存汉字拼音,再利用该字段查询
    这个方法在数据库里面看起来比较直观,不过同样需要把汉字转换成拼音,直接获得拼音的首字母还是不够的.......
    在网上找了份代码,运行的还不错,不过需要下载一个字库文件:

  

RAR压缩包:
下载该附件:http://www.bigasp.com.cn/Uploads/Files/Code/gbk拼音字库.rar

    预览地址:http://www.bigasp.com.cn/extra/gbk2py
    代码如下:

<?php
class my_Getpy {    
 var 
$_dat 'py.dat';    
 var 
$_fd  false;    
   
 function 
my_Getpy($pdat '') {    
  if (
'' != $pdat)    
  
$this->_dat $pdat;    
 }    
   
 function 
load($pdat '') {    
  if (
'' == $pdat)    
  
$pdat $this->_dat;    
  
$this->unload();    
  
$this->_fd = @fopen($pdat'rb');    
  if (!
$this->_fd) {    
   
trigger_error("unable to load PinYin data file `$pdat`"E_USER_WARNING);    
   return 
false;    
  }    
  return 
true;    
 }    
   
 function 
unload() {    
  if (
$this->_fd) {    
   @
fclose($this->_fd);    
   
$this->_fd false;    
  }    
 }    
   
 function 
get($zh) {    
  if (
strlen($zh) != 2) {    
   
trigger_error("`$zh` is not a valid GBK hanzi"E_USER_WARNING);    
   return 
false;    
  }    
  if (!
$this->_fd && !$this->load()) return false;    
  
$high ord($zh[0]) - 0x81;    
  
$low  ord($zh[1]) - 0x40;    
  
// 计算偏移位置    
  
$nz = ($ord0 0x81);    
  
$off = ($high<<8) + $low - ($high 0x40);    
  
// 判断 off 值    
  
if ($off 0) {    
   
trigger_error("`$zh` is not a valid GBK hanzi-2"E_USER_WARNING);    
   return 
false;    
  }    
  
fseek($this->_fd$off 8SEEK_SET);    
  
$ret fread($this->_fd8);    
  
$ret unpack('a8py'$ret);    
  return 
$ret['py'];    
 }    
   
 function 
_my_Getpy() {    
  
$this->_unload();    
 }    

// demo 测试例子   
?>    
   
<title>GBK码汉字转拼音</title>    
<h1>GBK码汉字转拼音</h1>    
   
<form method=get>    
输入汉字试试:<input type="text" size="16" name="zh">    
<input type="submit">    
</form>    
   
<?php    
if ($str $_GET['zh']) {    
 
$py = new my_Getpy;        
 
$len strlen($str);    
 
$ret '';    
 for (
$i 0$i $len$i++) {    
  if (
ord($str[$i]) > 0x80) {    
   
$xx $py->get(substr($str$i2));    
   
$ret .= ($xx ?  $xx ' ' substr($str$i2));        
   
$i++;    
  } else {    
   
$ret .= $str[$i];    
  }    
 }    
 
$py->unload();    
 echo 
"字串 `<font color=red>{$str}</font>` 的拼音是: <font color=red>{$ret}</font>\n";    
}    
?>   

select * from pinyin order by CONVERT(NAME USING GBK)

PHP文件下载类

[不指定 2009/06/05 15:12 | by 折雨 ]

<?
//====================================================
//                FileName:download.class.php
//                Summary: 文件下载类
//                Author: feifengxlq
//      Email:feifengxlq@sohu.com
//                CreateTime: 2005-7-19     
//                LastModifed:
//                copyright (c)2005 xlq.100steps.net  [email]feifengxlq@sohu.com[/email]
//   使用范例:
// $download=new download('php,exe,html',false);
//  if(!$download->downloadfile($filename))
//  {
//    echo $download->geterrormsg();
//  }      
//====================================================
class download{
  var $debug=true;
  var $errormsg='';
  var $Filter=array();
  var $filename='';
  var $mineType='text/plain';
  var $xlq_filetype=array();

  function download($fileFilter='',$isdebug=true)
  {
    $this->setFilter($fileFilter);
        $this->setdebug($isdebug);        
        $this->setfiletype();
  }
  
  function setFilter($fileFilter)
  {
    if(empty($fileFilter)) return ;
        $this->Filter=explode(',',strtolower($fileFilter));
  }
  function setdebug($debug)
  {
    $this->debug=$debug;
  }
  
  function setfilename($filename)
  {
    $this->filename=$filename;
  }
  
  function downloadfile($filename)
  {
    $this->setfilename($filename);
    if($this->filecheck())
        {
          $fn = array_pop( explode( '/', strtr( $this->filename, '', '/' ) ) );
          header( "Pragma: public" );
      header( "Expires: 0" ); // set expiration time
      header( "Cache-Component: must-revalidate, post-check=0, pre-check=0" );
          header( "Content-type:".$this->mineType );
      header( "Content-Length: " . filesize( $this->filename ) );
      header( "Content-Disposition: attachment; filename="$fn"" );
      header( 'Content-Transfer-Encoding: binary' );
      readfile( $this->filename );
      return true;
        }else
        {
        return false;
        }
  }
  function geterrormsg()
  {
    return $this->errormsg;
  }
  
  function filecheck()
  {
    $filename=$this->filename;
        if(file_exists($filename))
        {
           $filetype=strtolower(array_pop(explode('.',$filename)));
           if(in_array($filetype,$this->Filter))
           {
             $this->errormsg.=$filename.'不允许下载!';
                 if($this->debug) exit($filename.'不允许下载!') ;
                 return false;
           }else
           {
             if ( function_exists( "mime_content_type" ) )
                 {
           $this->mineType = mime_content_type( $filename );
         }
                 if(empty($this->mineType))
                 {
                    if( isset($this->xlq_filetype[$filetype]) )  $this->mineType = $this->xlq_filetype[$filetype];
                 }
                 if(!empty($this->mineType))
                   return true;
                 else
                 {
                    $this->errormsg.='获取'.$filename.'文件类型时候发生错误,或者不存在预定文件类型内';
                        if($this->debug) exit('获取文件类型出错');
                        return false;
                 }
           } 
        }else
        {
          $this->errormsg.=$filename.'不存在!';
          if($this->debug) exit($filename.'不存在!') ;
          return false;
        }
  }
  
  function setfiletype()
  {
    $this->xlq_filetype['chm']='application/octet-stream';
    $this->xlq_filetype['ppt']='application/vnd.ms-powerpoint';
    $this->xlq_filetype['xls']='application/vnd.ms-excel';
    $this->xlq_filetype['doc']='application/msword';
    $this->xlq_filetype['exe']='application/octet-stream';
    $this->xlq_filetype['rar']='application/octet-stream';
    $this->xlq_filetype['js']="javascript/js";
    $this->xlq_filetype['css']="text/css";
    $this->xlq_filetype['hqx']="application/mac-binhex40";
    $this->xlq_filetype['bin']="application/octet-stream";
    $this->xlq_filetype['oda']="application/oda";
    $this->xlq_filetype['pdf']="application/pdf";
    $this->xlq_filetype['ai']="application/postsrcipt";
    $this->xlq_filetype['eps']="application/postsrcipt";
    $this->xlq_filetype['es']="application/postsrcipt";
    $this->xlq_filetype['rtf']="application/rtf";
    $this->xlq_filetype['mif']="application/x-mif";
    $this->xlq_filetype['csh']="application/x-csh";
    $this->xlq_filetype['dvi']="application/x-dvi";
    $this->xlq_filetype['hdf']="application/x-hdf";
    $this->xlq_filetype['nc']="application/x-netcdf";
    $this->xlq_filetype['cdf']="application/x-netcdf";
    $this->xlq_filetype['latex']="application/x-latex";
    $this->xlq_filetype['ts']="application/x-troll-ts";
    $this->xlq_filetype['src']="application/x-wais-source";
    $this->xlq_filetype['zip']="application/zip";
    $this->xlq_filetype['bcpio']="application/x-bcpio";
    $this->xlq_filetype['cpio']="application/x-cpio";
    $this->xlq_filetype['gtar']="application/x-gtar";
    $this->xlq_filetype['shar']="application/x-shar";
    $this->xlq_filetype['sv4cpio']="application/x-sv4cpio";
    $this->xlq_filetype['sv4crc']="application/x-sv4crc";
    $this->xlq_filetype['tar']="application/x-tar";
    $this->xlq_filetype['ustar']="application/x-ustar";
    $this->xlq_filetype['man']="application/x-troff-man";
    $this->xlq_filetype['sh']="application/x-sh";
    $this->xlq_filetype['tcl']="application/x-tcl";
    $this->xlq_filetype['tex']="application/x-tex";
    $this->xlq_filetype['texi']="application/x-texinfo";
    $this->xlq_filetype['texinfo']="application/x-texinfo";
    $this->xlq_filetype['t']="application/x-troff";
    $this->xlq_filetype['tr']="application/x-troff";
    $this->xlq_filetype['roff']="application/x-troff";
    $this->xlq_filetype['shar']="application/x-shar";
    $this->xlq_filetype['me']="application/x-troll-me";
    $this->xlq_filetype['ts']="application/x-troll-ts";
    $this->xlq_filetype['gif']="image/gif";
    $this->xlq_filetype['jpeg']="image/pjpeg";
    $this->xlq_filetype['jpg']="image/pjpeg";
    $this->xlq_filetype['jpe']="image/pjpeg";
    $this->xlq_filetype['ras']="image/x-cmu-raster";
    $this->xlq_filetype['pbm']="image/x-portable-bitmap";
    $this->xlq_filetype['ppm']="image/x-portable-pixmap";
    $this->xlq_filetype['xbm']="image/x-xbitmap";
    $this->xlq_filetype['xwd']="image/x-xwindowdump";
    $this->xlq_filetype['ief']="image/ief";
    $this->xlq_filetype['tif']="image/tiff";
    $this->xlq_filetype['tiff']="image/tiff";
    $this->xlq_filetype['pnm']="image/x-portable-anymap";
    $this->xlq_filetype['pgm']="image/x-portable-graymap";
    $this->xlq_filetype['rgb']="image/x-rgb";
    $this->xlq_filetype['xpm']="image/x-xpixmap";
    $this->xlq_filetype['txt']="text/plain";
    $this->xlq_filetype['c']="text/plain";
    $this->xlq_filetype['cc']="text/plain";
    $this->xlq_filetype['h']="text/plain";
    $this->xlq_filetype['html']="text/html";
    $this->xlq_filetype['htm']="text/html";
    $this->xlq_filetype['htl']="text/html";
    $this->xlq_filetype['rtx']="text/richtext";
    $this->xlq_filetype['etx']="text/x-setext";
    $this->xlq_filetype['tsv']="text/tab-separated-values";
    $this->xlq_filetype['mpeg']="video/mpeg";
    $this->xlq_filetype['mpg']="video/mpeg";
    $this->xlq_filetype['mpe']="video/mpeg";
    $this->xlq_filetype['avi']="video/x-msvideo";
    $this->xlq_filetype['qt']="video/quicktime";
    $this->xlq_filetype['mov']="video/quicktime";
    $this->xlq_filetype['moov']="video/quicktime";
    $this->xlq_filetype['movie']="video/x-sgi-movie";
    $this->xlq_filetype['au']="audio/basic";
    $this->xlq_filetype['snd']="audio/basic";
    $this->xlq_filetype['wav']="audio/x-wav";
    $this->xlq_filetype['aif']="audio/x-aiff";
    $this->xlq_filetype['aiff']="audio/x-aiff";
    $this->xlq_filetype['aifc']="audio/x-aiff";
    $this->xlq_filetype['swf']="application/x-shockwave-flash";
  }
}
?> 

用php写的一个HTTP下载类

[不指定 2009/06/05 15:10 | by 折雨 ]
在php中,下载http资源比较常用的一种做法就是用 file_get_contents 这个函数,但这函数无法获得http头的信息,会给一些应用带来不方便,因此我写了一个http下载类来解决这个问题,测试感觉速度和file_get_contents相差无几。
1.文件格式
首先要遇到的问题肯定是文件格式,在作web开发时,大家都是用的html或xhtml,到了wap开发时,就得用wml了.什么是wml?大家可以去查更详细的资料,我这里只是略微的提到.在我看来wml类似于xml,有非常严格的格式,在作wap页面时,都得用wml来作为显示.

wml的语法非常简单,在用php作动态输出时,一定要发送一个头信息,标明本页面是wml,而不是别的什么*ml.

<?php
header
(”Content-typetext/vnd.wap.wmlcharset=\”gb2312\");
?>

<?php 
$htm 
"http://www.rolandlau.com/index.html";
$wap "http://wap.rolandlau.com/index.wml";
$wap2 "http://www.rolandlau.com/index.htm";
$agent=$_SERVER['HTTP_USER_AGENT'];
$Accept $_SERVER["HTTP_ACCEPT"];
echo 
$agent;
$isWAP false;
     if (
substr_count(strtolower($Accept),strtolower("wap")) ||  substr_count(strtolower($Accept),strtolower("wml"))) {
      
$isWAP true;
     }else{
     
$brow substr($agent,0,4);
   if (
strtolower($brow)==strtolower("Noki") || strtolower($brow)==strtolower("Eric") || strtolower($brow)==strtolower("R380") || strtolower($brow)==strtolower("MOT-") || strtolower($brow)==strtolower("UPG1") || strtolower($brow)==strtolower("Jing") || strtolower($brow)==strtolower("Acoo") || strtolower($brow)==strtolower("Wapt") || strtolower($brow)==strtolower("QWAP") || strtolower($brow)==strtolower("m-cr") || strtolower($brow)==strtolower("MC21") || strtolower($brow)==strtolower("Your") || strtolower($brow)==strtolower("YOUR") || strtolower($brow)==strtolower("w@pS") || strtolower($brow)==strtolower("Alca") || strtolower($brow)==strtolower("wapw") || strtolower($brow)==strtolower("Rain") || strtolower($brow)==strtolower("Java") || strtolower($brow)==strtolower("AUR ") || strtolower($brow)==strtolower("UP.B") || strtolower($brow)==strtolower("WAPm") || strtolower($brow)==strtolower("WinW") || strtolower($brow)==strtolower("WapI") || strtolower($brow)==strtolower("WAPJ") || strtolower($brow)==strtolower("WapV") || strtolower($brow)==strtolower("4thp") || strtolower($brow)==strtolower("Waps") || strtolower($brow)==strtolower("Mits") || strtolower($brow)==strtolower("SIE-") || strtolower($brow)==strtolower("Aptu") || strtolower($brow)==strtolower("WmlS") || strtolower($brow)==strtolower("Wapa")) {
       
$isWAP true;
}}
       
$isWAP2 false;
     if (
$isWAP) {
       if (
substr_count(strtolower($Accept),strtolower("xhtml"))) {
         
$isWAP2 true;
}}
   if (
$isWAP2) {
    
header("location:$wap2");}
   else if (
$isWAP) {
     
header("location:$wap");}
   else {
    
header("location:$htm");
       }

?>

武林英雄聊天表情一览
  9494
  <国家>纪轩泽 点头说道:“就是!就是!”
  ??
  <武馆>纪轩泽 露出迷惑的神情。
  @@
  <国家>纪轩泽 的一双眼睛瞪得比铜铃还大!越来越大……瞪破了!
  agree
  <国家> 纪轩泽 歪着脑袋问大家:「你们说我说的对不对耶?」
分页: 1/71 第一页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]