我结婚了

我要结婚了,完全闪电式的,绝对暴风骤雨式的,非常迅雷掩耳不及式的,这不是一句天气预报就可以震惊世界的。

我要结婚了,我必将开始一段百无聊赖、俗不可耐、万般无奈的夫妻生活,——当然也不排除我可能度过一段老鹰捉小鸡、周瑜打黄盖、霸王硬上弓般地美好时光。

明天即将回老家办婚礼,正日子是2011年11月5日,农历10月初10,星期六,日子还不错吧?这是我冥思苦想了好几秒钟时间以及动用了S级高速缓存才憋出并定下来的日子!嘿嘿

从和LP确定关系、登记(一年前的今天)、买房、装修。。。一直都是神速,效率之高都另我自己咋舌!这个过程也是充满了幸福、快乐,当然也有煎熬、无奈和各种坎坷。甚至在装修时还受到他人欺诈,不过也让对方尝到了我黑涩会的一面!想想,我还是要全力去改掉自己凶巴巴的坏脾气,无论发生或遇到啥事都应该面不改色并温文尔雅的处理好!因为俺已经不仅仅是为自己而活了。。。用LP的话来说,我发火时那神色简直可以和禽兽媲美!

说太多也没啥用,我只希望我和LP能够幸福快乐的走完这一生,能够互敬互爱,不离不弃!希望双方亲人都能够和睦相处,平平安安!希望我40岁的时候可以拿到博士学位!希望我的孩子秉承他爹妈的优良传统并成为富二代!希望和XDJM们把Mofun公司做大做强!希望。。。

户口

因在长春买了房子 现终于有资格可以落户口了。今早拿着相关资料去了城西派出所户籍科,不到10分钟就把户口本给我了,哈哈,心想这回咱也是长春淫了!翻开本 傻眼了… 城西镇向阳村12组西环城公路115号卡梅尔城X栋X门X号。。。又镇又村又组的 弄得比以前还惨!

姥姥

8月7日凌晨 姥姥因癌症去世,享年78岁!获悉后哭得直流鼻血…携LP下午5点赶到老家,次日凌晨2点驱车去祖坟地亲自给姥姥安葬并与姥爷拼骨!为了姥姥,有担当的家人真的已经不遗余力尽己所能,但对于家里的另一些人…我想说的是,姥姥为何走得这么快 又为何带着遗憾而走?人在做,天在看!没有担当,迟早会还!

几段PHP代码 记录

简单方式获取视频预览图

1
2
3
4
5
6
7
8
9
10
<?php  
convertToFlv( "some-video-input.avi", "output.jpg" );  
function convertToFlv( $input, $output ) {  
echo "Converting $input to $output<br />";  
$command = "ffmpeg -v 0 -y -i $input -vframes 1 -ss 5 -vcodec mjpeg -f rawvideo -s 286x160 -aspect 16:9 $output ";  
echo "$command<br />";  
shell_exec( $command );  
echo "Converted<br />";  
}  
?>

分析用户ip归属地

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
//需要用到QQwry.dat数据库,先从网上下载些数据库.这些是核心部分,可以写到一个单独的php里,用的时候直接include就可以
define('__QQWRY__' , dirname(__FILE__)."/qqwry.dat");
class QQWry{
    var $StartIP=0;
    var $EndIP=0;
    var $Country='';
    var $Local='';
    var $CountryFlag=0;
    var $fp;
    var $FirstStartIp=0;
    var $LastStartIp=0;
    var $EndIpOff=0 ;
    function getStartIp($RecNo){
     $offset=$this->FirstStartIp+$RecNo * 7 ;
     @fseek($this->fp,$offset,SEEK_SET) ;
     $buf=fread($this->fp ,7) ;
     $this->EndIpOff=ord($buf[4]) + (ord($buf[5])*256) + (ord($buf[6])* 256*256);
     $this->StartIp=ord($buf[0]) + (ord($buf[1])*256) + (ord($buf[2])*256*256) + (ord($buf[3])*256*256*256);
     return $this->StartIp;
    }
    function getEndIp(){
     @fseek ( $this->fp , $this->EndIpOff , SEEK_SET ) ;
     $buf=fread ( $this->fp , 5 ) ;
     $this->EndIp=ord($buf[0]) + (ord($buf[1])*256) + (ord($buf[2])*256*256) + (ord($buf[3])*256*256*256);
     $this->CountryFlag=ord ( $buf[4] ) ;
     return $this->EndIp ;
    }
    function getCountry(){
     switch ( $this->CountryFlag ) {
        case 1:
        case 2:
         $this->Country=$this->getFlagStr ( $this->EndIpOff+4) ;
         //echo sprintf('EndIpOffset=(%x)',$this->EndIpOff );
         $this->Local=( 1 == $this->CountryFlag )? '' : $this->getFlagStr ( $this->EndIpOff+8);
         break ;
        default :
         $this->Country=$this->getFlagStr ($this->EndIpOff+4) ;
         $this->Local=$this->getFlagStr ( ftell ( $this->fp )) ;
     }
    }
    function getFlagStr ($offset){
     $flag=0 ;
     while(1){
        @fseek($this->fp ,$offset,SEEK_SET) ;
        $flag=ord(fgetc($this->fp ) ) ;
        if ( $flag == 1 || $flag == 2 ) {
         $buf=fread ($this->fp , 3 ) ;
         if ($flag==2){
            $this->CountryFlag=2;
            $this->EndIpOff=$offset - 4 ;
         }
         $offset=ord($buf[0]) + (ord($buf[1])*256) + (ord($buf[2])* 256*256);
        }
        else{
         break ;
        }
     }
     if($offset<12)
        return '';
     @fseek($this->fp , $offset , SEEK_SET ) ;
 
     return $this->getStr();
    }
    function getStr ( )
    {
     $str='' ;
     while ( 1 ) {
        $c=fgetc ( $this->fp ) ;
        if(ord($c[0])== 0 )
         break ;
        $str.= $c ;
     }
     return $str ;
    }
    function qqwry ($dotip='') {
        if( !is_string($dotip) || $dotip==''){return;}
                if(preg_match("/^127/",$dotip)){$this->Country="本地网络";return ;}
        elseif(preg_match("/^192/",$dotip)) {$this->Country="局域网";return ;}
 
     $nRet;
     $ip=$this->IpToInt ( $dotip );
     $this->fp= fopen(__QQWRY__, "rb");
     if ($this->fp == NULL) {
         $szLocal= "OpenFileError";
        return 1;
     }
     @fseek ( $this->fp , 0 , SEEK_SET ) ;
     $buf=fread ( $this->fp , 8 ) ;
     $this->FirstStartIp=ord($buf[0]) + (ord($buf[1])*256) + (ord($buf[2])*256*256) + (ord($buf[3])*256*256*256);
     $this->LastStartIp=ord($buf[4]) + (ord($buf[5])*256) + (ord($buf[6])*256*256) + (ord($buf[7])*256*256*256);
     $RecordCount= floor( ( $this->LastStartIp - $this->FirstStartIp ) / 7);
     if ($RecordCount <= 1){
        $this->Country="FileDataError";
        fclose($this->fp) ;
        return 2 ;
     }
     $RangB= 0;
     $RangE= $RecordCount;
     while ($RangB < $RangE-1)
     {
     $RecNo= floor(($RangB + $RangE) / 2);
     $this->getStartIp ( $RecNo ) ;
 
        if ( $ip == $this->StartIp )
        {
         $RangB=$RecNo ;
         break ;
        }
     if ($ip>$this->StartIp)
        $RangB= $RecNo;
     else
        $RangE= $RecNo;
     }
     $this->getStartIp ( $RangB ) ;
     $this->getEndIp ( ) ;
 
     if ( ( $this->StartIp <= $ip ) && ( $this->EndIp >= $ip ) ){
        $nRet=0 ;
        $this->getCountry ( ) ;
        $this->Local=str_replace("(我们一定要解放台湾!!!)", "", $this->Local);
     }
     else{
        $nRet=3 ;
        $this->Country='未知' ;
        $this->Local='' ;
     }
     fclose ( $this->fp );
        return $nRet ;
    }
    function IpToInt($Ip) {
     $array=explode('.',$Ip);
     $Int=($array[0] * 256*256*256) + ($array[1]*256*256) + ($array[2]*256) + $array[3];
     return $Int;
    }
}
function GetIP(){//获取IP
    return $_SERVER[REMOTE_ADDR]?$_SERVER[REMOTE_ADDR]:$GLOBALS[HTTP_SERVER_VARS][REMOTE_ADDR];
}
?>

PHP多文件上传类

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php 
/*
PHP多文件上传类
*/
/*
class more_file_upload{
const FILE_PATH='../upfileclass/uploadfile/';
var file_type;
var file_type_array;
var file_type_real_array;
var file_type_string;
var file_name;
var file_size;
var file_tmp_name;
var file_error;
var handledate;
static totalsize=0;
 
function __construct(file_name,file_error,file_size,file_tmp_name,file_type){
this->handledate=date('m-d-Y');
if (!empty(file_name)){
this->file_name = file_name;
this->file_error = file_error;
this->file_size = file_size;
this->file_tmp_name = file_tmp_name;
this->file_type = file_type;
this->file_type_array = array('/', 'image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png');
this->file_type_real_array = array(0.1, 'jpg'=>74707370, 'gif'=>7173, 'bmp'=>6677, 'png'=>807871);
 
this->show_execute_message(this->file_error,this->file_name,this->file_type,this->file_size);
}
}
 
function __destruct(){
this->file_name = NULL;
this->file_error = NULL;
this->file_size = NULL;
this->file_tmp_name = NULL;
this->file_type = NULL;
self::totalsize = 0;
}
 
function show_execute_message(smfileerror,smfilename,smfiletype,smfilesize){
if(smfileerror>0){
switch (smfileerror){
case 1: smfilemessage='<strong>文件超过服务器的约定大小!</strong>';break;
case 2: smfilemessage='<strong>文件超过指定的文件大小!</strong>';break;
case 3: smfilemessage='<strong>文件只上传了部分!</strong>';break;
case 4: echo "this->file_name ".'文件上传失败!<br/>';break;
}
self::__destruct();
}else{
smfiletypeflag = array_search(smfiletype,this->file_type_array);
 
//进行真实格式验证
if(smfiletypeflag != false){
file = fopen(this->file_tmp_name, "rb");
bin = fread(file, 10);
fclose(file);
strInfo = @unpack("c10chars", bin);
typeCode = intval(strInfo['chars1'].strInfo['chars2']);
smfiletypeflag = array_search(typeCode, this->file_type_real_array);
if(smfiletypeflag == false){ //判断是否是png图片
typeCode = intval(strInfo['chars2'].strInfo['chars3'].strInfo['chars4']);
smfiletypeflag = array_search(typeCode, this->file_type_real_array);
if(smfiletypeflag == false){ //判断是否是jpg图片
$typeCode = intval(strInfo['chars7'].strInfo['chars8'].strInfo['chars9'].strInfo['chars10']);
smfiletypeflag = array_search(typeCode, this->file_type_real_array);
}
}
}
 
if($smfiletypeflag == false){
$smfilemessage='<strong>文件类型不对,请核实!</strong>';
self::__destruct();
}else{
$resflag = $this->move_file($this->file_tmp_name,this->file_name);
if (resflag == 1){
$smfilemessage = '文件上传成功!';
self::totalsize +=intval($smfilesize);
self::__destruct();
}else{
$smfilemessage = '<strong>文件上传失败!</strong>';
self::__destruct();
}
}
}
 
$smfilesizeformat = $this->size_BKM(smfilesize);
echo '<tr>
<td align="left" >'.smfilename.'</td>
<td align="center" >'.smfiletype.'</td>
<td align="center" >'.smfilesizeformat.'</td>
<td align="center" >'.smfilemessage.'</td>
</tr>';
}
 
function move_file(mvfiletmp,mvfilename){ //移动文件
mvfilenamearr = explode('.',basename(mvfilename));
mvfilenamearr[0] = this->rand_string();
mvfilename = implode('.',mvfilenamearr);
 
if (is_uploaded_file(mvfiletmp)){
uploadfile = self::FILE_PATH."mvfilename";
result = move_uploaded_file(mvfiletmp,uploadfile);
return result;
}
}
 
function rand_string(){
string = md5(uniqid(rand().microtime()));
return string;
}
 
function size_BKM(size){ // B/KB/MB单位转换
if(size < 1024)
{
size_BKM = (string)size . " B";
}
elseif(size < (1024 * 1024))
{
size_BKM = number_format((double)(size / 1024), 1) . " KB";
}else
{
size_BKM = number_format((double)(size / (1024*1024)),1)." MB";
}
return size_BKM;
}
}*/
 
?>

2010年终盘点

时间过得真快,2010就这样悄然而去。但2010这一年来对于我来说很不平静,起起落落,是是非非。
如果用几个关键字来形容这一年的感受,那么就是:刺激、现实、幸福、理解、本性、利益、忙碌

家,婚姻

2010年完成了之前所许的一个小愿望--拥有一个自己的小家

并且超额完成了任务--混了个媳妇并且已经登记(2010/11/2),严格来讲算是闪婚了! :oops: 从确定关系到登记 2个月不到。但我们相识了5年…

以前听过一些关于领证时的矛盾心情,我听了有些迷惑,既然已经决定结婚,去办理合法的手续有什么矛盾呢?如果说有矛盾的成分出现,那肯定是对婚姻不信任,既然不信任为什么要结婚呢?我觉得我还是长大了,去民政局的路上我什么也没有考虑,好象一切都是应该到来的,对于昨天和未来,在确认签字的一瞬间彻底划清了界限。拥有了这个红色的本本,就拥有了那么一份责任,同时无声的给彼此许下了不朽的誓言。

领了红色本本,意味着换了一种方式生活,同时也换了一种角色生活,也许等我看到换位后的差距后,对于自己的生活我会重新的去审视,也许只有重新审视我才能找到某一种落差,也许只有尽力的去补偿一些东西,我的良知才会有片刻的平衡。我不想让自己的生活永远的拴在哪个永远只属于自己的世界,杜绝所有关心和爱护自己的人。也许每个人的人生都有不同的结局,我想我的结局就是应该这样快乐的过下去,而我相信每个人的人生都是依靠自己的努力去改变的,我更愿意相信明天会更好。

事业

与某集团老总联合注册创办了新公司(也是我的第二个公司)长春魔方网络科技有限公司 mofun.com.cn

主要做的项目是 手机/移动互联网、长春本地生活门户…  0431.cc(目前平台正在研发阶段,年后将陆续正式上线)

朋友

熙熙而来,皆为利来;攘攘而往,皆为利往。

以前我一直认为只要投缘成为朋友,如果彼此珍惜的话 就能够相处一生。但经历了一些事情之后,我发现“没有永远的敌人、也没有永远的朋友、只有永远的利益”是很正确的。这句话可能很多人听了或看了以后都会嗤之以鼻 不以为然!但在自己身上真正发生后你就会觉得人和人之间有时真的很悲哀!根本不值得相信!一生中会有很多朋友,但每个朋友只陪你走其中的一段,就这么简单!也许结论悲哀,但又无可奈何!

在这个崇尚物质的时代,随着道义意识的泯灭,为朋友两肋插刀的少了,更多的是插朋友两刀。也许,在朋友有困难的时候,我们似乎可以为朋友做一切的事情。然而,一旦到了利益攸关,需要我们做出选择的时候,朋友间不拔刀相向已是万幸。当危机来临,没有人会为你挡子弹,把自己锻造得刀枪不入才是最关键。

不过,我还是会将心比心的珍惜我的每一位朋友!但不是真朋友,也绝不会强求,更不会遗憾。

展望2011

希望我和老婆能够把小家装修得漂漂亮亮的,把婚事办了,然后适合的时候再生个小龙女(龙年出生的闺女) :mrgreen:

将新公司做大做强,成为长春本地最大的互联网公司。

同时我们也对外公开招聘吸纳各界人才,请关注 mofun.com.cn  一个人能走多远,取决于与谁同行。如果人生旅途方向一致,我们愿意为同行的你背负行囊。

《老男孩》筷子兄弟

最欣赏的两首歌词 除了《稻香》就是这个了

音频片段:需要 Adobe Flash Player(9 或以上版本)播放音频片段。 点击这里下载最新版本。您需要开启浏览器的 JavaScript 支持。

那是我日夜思念 深深爱着的人呐
到底我该如何表达 她会接受我吗
也许永远都不会跟她说出那句话
注定我要浪迹天涯 怎么能有牵挂
梦想总是遥不可及 是不是应该放弃
花开花落又是一季 春天啊你在哪里

青春如同奔流的江河 一去不回来不及道别
只剩下麻木的我 没有了当年的热血
看那满天飘零的花朵 在最美丽的时刻凋谢
有谁会记得这世界他来过

转眼过去 多年世间 多少离合悲欢
曾经志在四方少年 羡慕南飞的雁
各自奔前程的身影 匆匆渐行渐远
未来在哪里平凡 啊谁给我答案
那时陪伴我的人哪 你们如今在何方
我曾经爱过的人啊 现在是什么模样

当初的愿望实现了吗
事到如今只好祭奠吗
任岁月风干理想 再也找不回真的我
抬头仰望着漫天星河
那时候陪伴我的那颗
这里的故事 你是否还记得

生活像一把无情刻刀 改变了我们模样
未曾绽放就要枯萎吗 我有过梦想

青春如同奔流的江河 一去不回来不及道别
只剩下麻木的我 没有了当年的热血
看那满天飘零的花朵 在最美丽的时刻凋谢
有谁会记得这世界他 曾经来过

当初的愿望实现了吗
事到如今只好祭奠吗
任岁月风干理想 再也找不回真的我
抬头仰望着漫天星河
那时候陪伴我的那颗
这里的故事 你是否还记得
如果有明天 祝福你亲爱的