<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>8Next by Neemem</title>
	<atom:link href="http://www.8next.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.8next.com</link>
	<description></description>
	<pubDate>Sun, 30 Nov 2008 10:05:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>谷歌浏览器 Chrome 发布 Linux 版本即将跟进</title>
		<link>http://www.8next.com/archives/2998</link>
		<comments>http://www.8next.com/archives/2998#comments</comments>
		<pubDate>Sun, 30 Nov 2008 10:05:03 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[Other]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[chrome]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[linux mac]]></category>

		<category><![CDATA[浏览器]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2998</guid>
		<description><![CDATA[ 

今天谷歌浏览器Google Chrome正式对用户提供下载，不过现在只发布了 Windows 版本，Linux MAC 版本也将会在近期发布。谷歌浏览器 Chrome 改变了浏览器把地址栏在上标签在下的传统，界面相当简... ]]></description>
			<content:encoded><![CDATA[<p> </p>
<p><img src="http://www.8next.com/wp-content/uploads/2008/11/180501h84.gif" alt="" width="80" height="76" align="left" />今天谷歌浏览器<a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a> <a href="http://www.8next.com/archives/tag/chrome" class="st_tag internal_tag" rel="tag" title="Posts tagged with chrome">Chrome</a>正式对用户提供下载，不过现在只发布了 Windows 版本，<a href="http://www.8next.com/archives/tag/linux" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">Linux</a> MAC 版本也将会在近期发布。谷歌浏览器 <a href="http://www.8next.com/archives/tag/chrome" class="st_tag internal_tag" rel="tag" title="Posts tagged with chrome">Chrome</a> 改变了浏览器把地址栏在上标签在下的传统，界面相当简洁，而且界面很有 <a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a> 的风格，与我们平时所用的 <a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a> 产品的配色方案是类似的。</p>
<p><img class="aligncenter size-full wp-image-1066" title="google-chrome" src="http://www.8next.com/wp-content/uploads/2008/11/180502b95.jpg" alt="" width="493" height="162" />先要下载一个安装程序，然后安装程序会连接到网络下载浏览器需要的安装文件。似乎不是太方便。</p>
<p> </p>
<p><img class="aligncenter size-full wp-image-1067" title="google-chrome-1" src="http://www.8next.com/wp-content/uploads/2008/11/180502mb9.jpg" alt="" width="486" height="271" />可以导入你以前用的浏览器的一些用户数据</p>
<p> </p>
<p><img class="aligncenter size-full wp-image-1068" title="google-chrome-2" src="http://www.8next.com/wp-content/uploads/2008/11/180503h6i.jpg" alt="" width="499" height="412" />界面很简洁，不过经过笔者测试，<a href="http://www.8next.com/archives/tag/chrome" class="st_tag internal_tag" rel="tag" title="Posts tagged with chrome">Chrome</a> 的内存占用率有点高。</p>
<p> </p>
<p>目前<a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a>只提供Widnows版本，本站将密切关注 <a href="http://www.8next.com/archives/tag/chrome" class="st_tag internal_tag" rel="tag" title="Posts tagged with chrome">Chrome</a> <a href="http://www.8next.com/archives/tag/linux" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">Linux</a> 版本发布的信息。</p>
<p><a href="http://www.google.com/chrome" target="_blank">下载谷歌浏览器 Chrome</a></p>

	Tags: <a href="http://www.8next.com/archives/tag/chrome" title="chrome" rel="tag">chrome</a>, <a href="http://www.8next.com/archives/tag/google" title="Google" rel="tag">Google</a>, <a href="http://www.8next.com/archives/tag/linux" title="linux" rel="tag">linux</a>, <a href="http://www.8next.com/archives/tag/linux-mac" title="linux mac" rel="tag">linux mac</a>, <a href="http://www.8next.com/archives/tag/%e6%b5%8f%e8%a7%88%e5%99%a8" title="浏览器" rel="tag">浏览器</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2097" title="远程连接PostgreSQL服务器 (August 18, 2008)">远程连接PostgreSQL服务器</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1126" title="跨平台的XPwn源码已经发布（命令行版） (July 22, 2008)">跨平台的XPwn源码已经发布（命令行版）</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2032" title="贡献350万流量却分文未得 视频作者状告Youtube (August 16, 2008)">贡献350万流量却分文未得 视频作者状告Youtube</a> (0)</li>
	<li><a href="http://www.8next.com/archives/55" title="我喜欢的几个 WordPress 插件 (June 10, 2008)">我喜欢的几个 WordPress 插件</a> (1)</li>
	<li><a href="http://www.8next.com/archives/2892" title="在Linux系统下FTP的配置与应用 (October 22, 2008)">在Linux系统下FTP的配置与应用</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2998/feed</wfw:commentRss>
		</item>
		<item>
		<title>apache服务器使用.htaccess实现图片防盗链教程</title>
		<link>http://www.8next.com/archives/2996</link>
		<comments>http://www.8next.com/archives/2996#comments</comments>
		<pubDate>Thu, 27 Nov 2008 03:26:31 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Unix Like]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[chmod]]></category>

		<category><![CDATA[htaccess]]></category>

		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2996</guid>
		<description><![CDATA[所谓盗链，是指其他网站直接链接我们网站上的文件，一般来说，盗链的对象大多为很耗带宽的大体积文件，如图片、视频等。这样造成的后果主要有：增加了服务器的流量负担，影响我们网... ]]></description>
			<content:encoded><![CDATA[<p><span style="color: #cccccc;"><span style="color: #000000;">所谓盗链，是指其他网站直接链接我们网站上的文件，一般来说，盗链的对象大多为很耗带宽的大体积文件，如图片、视频等。这样造成的后果主要有：增加了服务器的流量负担，影响我们网站的访问速度。</span></span></p>
<p>如果你用的是<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>服务器，那么使用.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>文件就可以很方便的进行设置，从而防止其他站点的用户盗链我们站点的文件。</p>
<h3><a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>中的.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>文件</h3>
<p>.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>文件是<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>中相当重要的配置文件，其格式为纯文本，它提供了针对目录改变配置的方法，通过在一个特定的文档目录中放置一个包含一个或多个指令的文件，以作用于此目录及其所有子目录。</p>
<p>通过.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>文件，可以实现简单地很多在IIS中很繁琐甚至无法实现的功能，如密码保护、禁止显示目录列表、阻止/允许特定的IP地址、实现网址的301 重定向等等。</p>
<p>正如上面所说，.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>文件将影响其所在的目录及其子目录，因此，如果我们要保护的内容（此处以防止图片盗链为例，即图片）位于网站内多个目录下，可以考虑将其放在根目录下；而如果图片有单独的子目录如“/images/”，则只需将其放置在该目录下（当然也可以放到根目录中）。</p>
<p>需要注意的是，如果通过FTP方式将创建好的.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>上传到服务器上，传输模式应为ASCII而非Binary。上传到服务器后，应将其属性通过 <a href="http://www.8next.com/archives/tag/chmod" class="st_tag internal_tag" rel="tag" title="Posts tagged with chmod">CHMOD</a>修改为644 或“RW-R–R–”，这样，可以保证服务器能够使用同时无法通过浏览器修改，当然，.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>的可读属性也存在一定的风险：攻击者可通过它找出您要保护的对象或认证文件位置——解决办法是将认证文件.htpasswd放到网站根目录之外，这样，便无法通过网络找到它了。</p>
<h3>使用.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>禁止盗链</h3>
<p>通过.<a href="http://www.8next.com/archives/tag/htaccess" class="st_tag internal_tag" rel="tag" title="Posts tagged with htaccess">htaccess</a>来防止网站的图片、压缩文件、或视频等非Html文件被盗链的方法相当简单，通过在该文件中加入几句命令即可保护我们宝贵的带宽。例如本站的设置如下：</p>
<blockquote dir="ltr"><p>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$ [NC]<br />
RewriteCond %{HTTP_REFERER} !8next.com [NC]<br />
RewriteCond %{HTTP_REFERER} !ikuaizi.com [NC]<br />
RewriteCond %{HTTP_REFERER} !zhuaxia.com [NC]<br />
RewriteCond %{HTTP_REFERER} !xianguo.com [NC]<br />
RewriteCond %{HTTP_REFERER} !<a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">google</a>.com [NC]<br />
RewriteCond %{HTTP_REFERER} !bloglines.com [NC]<br />
RewriteCond %{HTTP_REFERER} !feedburner.com [NC]<br />
RewriteCond %{HTTP_REFERER} !feedsky.com [NC]<br />
RewriteRule .*\.(gif|jpg)$ http://domain.com/no.png [R,NC,L]</p></blockquote>
<p>简单的解释一下上述语句：</p>
<p><strong>1、RewriteCond %{HTTP_REFERER} !^$ [NC]</strong></p>
<p>允许空“HTTP_REFERER”的访问，即允许用户在浏览器地址栏中直接输入图片地址时图片文件的显示。一般而言，这是可选的，不过，建议这么设置，如果强迫必须具有“HTTP_REFERER”才能访问，可能会带来某些问题，比如说在用户通过代理服务器访问时。</p>
<p><strong>2、RewriteCond %{HTTP_REFERER} !domain.com [NC]</strong></p>
<p>设置允许访问的HTTP来源，包括我们的站点自身、<a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">Google</a>、Baidu、Bloglines、Feedburner等。</p>
<p><strong>3、RewriteRule .*\.(gif|jpg|png)$ </strong><strong>http://domain.com/no.png</strong><strong> [R,NC,L]</strong></p>
<p>定义被盗链时替代的图片，让所有盗链 jpg、gif、png 等文件的网页，显示根目录下的 no.png 文件。注意：替换显示的图片不要放在设置防盗链的目录中，并且该图片文件体积越小越好。当然你也可以不设置替换图片，而是使用下面的语句即可：</p>
<blockquote dir="ltr"><p>RewriteRule .*\.(gif|jpg|png)$ - [F]</p></blockquote>
<p><strong>4、说明一下其中的R、NC 和 L</strong></p>
<p>R 就是转向的意思<br />
NC 指的是不区分大小写<br />
L 的作用是指明本次转向到此结束，后续的转向不受先前判断语句的影响</p>
<p><strong>5、防止盗链的文件类型</strong></p>
<p>上例中是 gif、jpg、png，而根据需要，可更改或添加其他文件类型，如rar、mov等，不同文件扩展名间使用“|”分割。</p>
<p>这样的话，就可以基本做到简单的防止被盗链情况的发生，而且可以尽最大可能的减少服务器流量的无畏消耗，当然了，如果你不在意这点流量的话，那么可以不用考虑上述设置啦</p>

	Tags: <a href="http://www.8next.com/archives/tag/apache" title="apache" rel="tag">apache</a>, <a href="http://www.8next.com/archives/tag/chmod" title="chmod" rel="tag">chmod</a>, <a href="http://www.8next.com/archives/tag/htaccess" title="htaccess" rel="tag">htaccess</a>, <a href="http://www.8next.com/archives/tag/rewrite" title="rewrite" rel="tag">rewrite</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2989" title="Nginx的Rewrite设置及示例 (November 21, 2008)">Nginx的Rewrite设置及示例</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1106" title="Ajax跨域问题的一些解决方法 (July 22, 2008)">Ajax跨域问题的一些解决方法</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1906" title="浅析Apache中SSI和CGI的设定方法 (August 13, 2008)">浅析Apache中SSI和CGI的设定方法</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2993" title="安装cronolog,格式化Apache的日志文件 (November 26, 2008)">安装cronolog,格式化Apache的日志文件</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2991" title="多服务器的日志合并统计——apache日志的cronolog轮循 (November 26, 2008)">多服务器的日志合并统计——apache日志的cronolog轮循</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2996/feed</wfw:commentRss>
		</item>
		<item>
		<title>安装cronolog,格式化Apache的日志文件</title>
		<link>http://www.8next.com/archives/2993</link>
		<comments>http://www.8next.com/archives/2993#comments</comments>
		<pubDate>Wed, 26 Nov 2008 02:52:03 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[Unix Like]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[c compiler]]></category>

		<category><![CDATA[cronolog]]></category>

		<category><![CDATA[日志]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2993</guid>
		<description><![CDATA[使用cronolog可以格式化日志文件的格式，比如按时间分割，易于管理和分析。
cronolog的安装配置非常简单，简要说明如下:
1.下载软件
http://cronolog.org/download/index.html
2.解压缩
gzip -d cronolog-1.6.2... ]]></description>
			<content:encoded><![CDATA[<p>使用<a href="http://cronolog.org/">cronolog</a>可以格式化日志文件的格式，比如按时间分割，易于管理和分析。<br />
<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>的安装配置非常简单，简要说明如下:<br />
1.下载软件<br />
<a href="http://cronolog.org/download/index.html">http://cronolog.org/download/index.html</a><br />
2.解压缩<br />
gzip -d <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2.tar.gz<br />
tar xf <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2.tar<br />
2.进入相应的目录 ./configure<br />
3.make<br />
4.make install<br />
5.修改<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>配置文件</p>
<p>以下是我的安装日志，供大家参考:</p>
<table border="0">
<tbody>
<tr>
<td width="729" bgcolor="#999999">
<pre>[root@eygle opt]# wget http://<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.org/download/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2.tar.gz
--08:05:12--  http://<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.org/download/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2.tar.gz
           =&gt; `<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2.tar.gz'
Resolving <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.org... done.
Connecting to <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.org[217.160.212.212]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133,591 [application/x-gzip]

100%[==================================&gt;] 133,591       26.23K/s    ETA 00:00

08:05:19 (26.23 KB/s) - `<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2.tar.gz' saved [133591/133591]
[root@eygle opt]# gzip -d <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2.tar.gz
[root@eygle opt]# tar xf <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2.tar
[root@eygle opt]# cd <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2
[root@eygle <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2]# ls
aclocal.m4  config.cache   configure     <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.spec  install-sh  Makefile.am  mkinstalldirs  src
AUTHORS     config.log     configure.in  doc            lib         Makefile.in  NEWS           testsuite
ChangeLog   config.status  COPYING       INSTALL        Makefile    missing      README         TODO
[root@eygle <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2]# ./configure
loading cache ./config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... (cached) gcc
checking whether the <a href="http://www.8next.com/archives/tag/c-compiler" class="st_tag internal_tag" rel="tag" title="Posts tagged with c compiler">C compiler</a> (gcc  ) works... yes
checking whether the <a href="http://www.8next.com/archives/tag/c-compiler" class="st_tag internal_tag" rel="tag" title="Posts tagged with c compiler">C compiler</a> (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... (cached) yes
checking for ranlib... (cached) ranlib
checking for perl... (cached) /usr/bin/perl
checking how to run the C preprocessor... (cached) gcc -E
checking for ANSI C <a href="http://www.8next.com/archives/tag/header" class="st_tag internal_tag" rel="tag" title="Posts tagged with Header">header</a> files... (cached) yes
checking whether stat file-mode macros are broken... (cached) no
checking whether time.h and sys/time.h may both be included... (cached) yes
checking whether struct tm is in sys/time.h or time.h... (cached) time.h
checking for tm_zone in struct tm... (cached) yes
checking for fcntl.h... (cached) yes
checking for limits.h... (cached) yes
checking for unistd.h... (cached) yes
checking for working const... (cached) yes
checking for size_t... (cached) yes
checking whether struct tm is in sys/time.h or time.h... (cached) time.h
checking for strftime... (cached) yes
checking for vprintf... (cached) yes
checking for mkdir... (cached) yes
checking for mktime... (cached) yes
checking for putenv... (cached) yes
checking for strptime... (cached) yes
checking for localtime_r... (cached) yes
creating ./config.status
creating Makefile
creating lib/Makefile
creating src/Makefile
creating doc/Makefile
creating testsuite/Makefile
creating src/cronosplit
[root@eygle <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2]# make
Making all in lib
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/lib'
Making all in src
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/src'
Making all in doc
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/doc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/doc'
Making all in testsuite
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/testsuite'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/testsuite'
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2'
[root@eygle <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2]# make install
Making install in lib
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/lib'
make[2]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/lib'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/lib'
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/lib'
Making install in src
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/src'
make[2]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/src'
/bin/sh ../mkinstalldirs /usr/local/sbin
  /usr/bin/install -c  <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> /usr/local/sbin/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>
/bin/sh ../mkinstalldirs /usr/local/sbin
 /usr/bin/install -c  cronosplit /usr/local/sbin/cronosplit
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/src'
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/src'
Making install in doc
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/doc'
make[2]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/doc'
make[2]: Nothing to be done for `install-exec-am'.
/bin/sh ../mkinstalldirs /usr/local/info
 /usr/bin/install -c -m 644 ./<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.info /usr/local/info/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.info
 install-info --info-dir=/usr/local/info /usr/local/info/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.info
make  install-man1
make[3]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/doc'
/bin/sh ../mkinstalldirs /usr/local/man/man1
 /usr/bin/install -c -m 644 ./<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.1m /usr/local/man/man1/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>.1m
 /usr/bin/install -c -m 644 ./cronosplit.1m /usr/local/man/man1/cronosplit.1m
make[3]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/doc'
make[2]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/doc'
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/doc'
Making install in testsuite
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/testsuite'
make[2]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/testsuite'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/testsuite'
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2/testsuite'
make[1]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2'
make[2]: Entering directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2'
make[1]: Leaving directory `/opt/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2'
[root@eygle <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>-1.6.2]# which <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>
/usr/local/sbin/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a></pre>
</td>
</tr>
</tbody>
</table>
<p>安装完成以后需要对<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>进行适当配置，修改<a href="http://www.8next.com/archives/tag/httpd" class="st_tag internal_tag" rel="tag" title="Posts tagged with httpd">httpd</a>.conf文件，主要注意以下几点:<br />
1.自定义日志格式<br />
CustomLog &#8220;|/usr/local/sbin/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> /opt/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs/access_log.%Y%m%d&#8221; combined<br />
2.如果存在多个虚拟站点<br />
可以考虑在VirtualHost进行相应设置</p>
<table style="height: 162px;" border="0" width="618">
<tbody>
<tr>
<td width="729" bgcolor="#999999">
<pre>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com
    ServerName dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common</pre>
</td>
</tr>
</tbody>
</table>
<p>我的www.eygle.com存在多个子站点，但是都使用了同一个日志文件<br />
配置后生成日志文件的效果:</p>
<pre>[root@eygle logs]# ls -l access_log.20041226
-rw-r--r--    1 root     root       110425 Dec 26 09:10 access_log.20041226</pre>

	Tags: <a href="http://www.8next.com/archives/tag/apache" title="apache" rel="tag">apache</a>, <a href="http://www.8next.com/archives/tag/c-compiler" title="c compiler" rel="tag">c compiler</a>, <a href="http://www.8next.com/archives/tag/cronolog" title="cronolog" rel="tag">cronolog</a>, <a href="http://www.8next.com/archives/tag/%e6%97%a5%e5%bf%97" title="日志" rel="tag">日志</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2991" title="多服务器的日志合并统计——apache日志的cronolog轮循 (November 26, 2008)">多服务器的日志合并统计——apache日志的cronolog轮循</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1748" title="apache 常用管道符，通常用在apache 的日志格式定义。 (August 7, 2008)">apache 常用管道符，通常用在apache 的日志格式定义。</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1906" title="浅析Apache中SSI和CGI的设定方法 (August 13, 2008)">浅析Apache中SSI和CGI的设定方法</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1716" title="使用php结合syslog记录日志 (August 6, 2008)">使用php结合syslog记录日志</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2890" title="Subversion1.3.2安装以及配置 (October 21, 2008)">Subversion1.3.2安装以及配置</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2993/feed</wfw:commentRss>
		</item>
		<item>
		<title>多服务器的日志合并统计——apache日志的cronolog轮循</title>
		<link>http://www.8next.com/archives/2991</link>
		<comments>http://www.8next.com/archives/2991#comments</comments>
		<pubDate>Wed, 26 Nov 2008 02:49:51 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[Unix Like]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[cronolog]]></category>

		<category><![CDATA[unique visits]]></category>

		<category><![CDATA[webalizer]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2991</guid>
		<description><![CDATA[
内容摘要：你完全不必耐心地看完下面的所有内容，因为结论无非以下2点：
1 用 cronolog 干净，安全地轮循apache“日”志
2 用 sort -m 合并排序多个日志

根据个人的使用经历：
1 先介绍apache... ]]></description>
			<content:encoded><![CDATA[<div class="entry-content">
<div class="entry-body">内容摘要：你完全不必耐心地看完下面的所有内容，因为结论无非以下2点：<br />
1 用 <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> 干净，安全地轮循<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>“日”志<br />
2 用 sort -m 合并排序多个日志</p>
<p>根据个人的使用经历：<br />
1 先介绍<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>日志的合并方法；<br />
2 然后根据由此引出的问题说明日志轮循的必要性和解决方法，介绍如何通过<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>对<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>日志进行轮循；<br />
中间有很多在设计日志合并过程中一些相关工具的使用技巧和一些尝试的失败经历……<br />
我相信解决以上问题的路径不止这一条途径，以下方案肯定不是最简便或者说成本最低的，希望能和大家有更多的交流。</p></div>
<div id="more" class="entry-more">
<h2><strong>多服务器日志合并统计的必要性</strong></h2>
<p><strong> </strong> 越来越多大型的WEB服务使用DNS轮循来实现负载均衡：使用多个同样角色的服务器做前台的WEB服务，这大大方便了服务的分布规划和扩展性，但多个服务 器的分布使得日志的分析统计也变得有些麻烦。如果使用<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a>等日志分析工具对每台机器分别做日志统计：<br />
1 会对数据的汇总带来很多麻烦，比如：统计的总访问量需要将SERVER1 SERVER2&#8230;上指定月份的数字相加。<br />
2 会大大影响统计结果中唯一访客数<a href="http://www.8next.com/archives/tag/unique-visits" class="st_tag internal_tag" rel="tag" title="Posts tagged with unique visits">unique visits</a>，唯一站点数unique sites的等指标的统计，因为这几个指标并非几台机器的代数相加。</p>
<p>统一日志统计所带来的好处是显而易见的，但如何把所有机器的统计合并到一个统计结果里呢？<br />
首先也许会想：多个服务器能不能将日志记录到同一个远程文件里呢？我们不考虑使用远程文件系统记录日志的问题，因为带来的麻烦远比你获得的方便多的多……<br />
因此，要统计的多个服务器的日志还是：分别记录=&gt;并通过一定方式定期同步到后台=&gt;合并=&gt;后用日志分析工具来进行分析。</p>
<p>首先，要说明为什么要合并日志：因为<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a>没有将同一天的多个日志合并的功能<br />
先后运行<br />
<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a> log1<br />
<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a> log2<br />
<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a> log3<br />
这样最后的结果是：只有log3的结果。</p>
<p>能不能将log1&lt;&lt;log2&lt;&lt;log3简单叠加呢？<br />
因为一个日志的分析工具不是将日志一次全部读取后进行分析，而且流式的读取日志并按一定时间间隔，保存阶段性的统计结果。因此时间跨度过大（比如2条日志 间隔超过5分钟），一些日志统计工具的算法就会将前面的结果“忘掉”。因此， log1&lt;&lt;log2&lt;&lt;log3直接文件连接的统计结果还是：只有log3的统计结果。</p>
<h2><strong><strong><strong>多台服务</strong></strong>日志合并问题：把多个日志中的记录按时间排序后合并成一个文件</strong></h2>
<p><strong> </strong> 典型的多个日志文件的时间字段是这样的：<br />
log1 log2 log3<br />
00:15:00 00:14:00 00:11:00<br />
00:16:00 00:15:00 00:12:00<br />
00:17:00 00:18:00 00:13:00<br />
00:18:00 00:19:00 00:14:00<br />
14:18:00 11:19:00 10:14:00<br />
15:18:00 17:19:00 11:14:00<br />
23:18:00 23:19:00 23:14:00</p>
<p>日志合并必须是按时间将多个日志的交叉合并。合并后的日志应该是：<br />
00:15:00 来自log1<br />
00:15:00 来自log2<br />
00:16:00 来自log1<br />
00:17:00 来自log3<br />
00:18:00 来自log2<br />
00:19:00 来自log1<br />
&#8230;.</p>
<p>如何合并多个日志文件？<br />
下面以标准的clf格式日志（<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>）为例：<br />
apche的日志格式是这样的：<br />
%h %l %u %t \&#8221;%r\&#8221; %&gt;s %b<br />
具体的例子：<br />
111.222.111.222 - - [03/Apr/2002:10:30:17 +0800] &#8220;GET /index.html HTTP/1.1&#8243; 200 419</p>
<p>最简单的想法是将日志一一读出来，然后按日志中的时间字段排序<br />
cat log1 log2 log3 |sort -k 4 -t &#8221; &#8221;<br />
注释：<br />
-t &#8221; &#8220;: 日志字段分割符号是空格<br />
-k 4: 按第4个字段排序，也就是：[03/Apr/2002:10:30:17 +0800] 这个字段<br />
-o log_all: 输出到log_all这个文件中</p>
<p>但这样的效率比较低，要知道。如果一个服务已经需要使用负载均衡，其服务的单机日志条数往往都超过了千万级，大小在几百M，这样要同时对多个几百M的日志 进行排序，机器的负载可想而之……<br />
其实有一个优化的途径，要知道：即使单个日志本身已经是一个“已经按照时间排好序“的文件了，而sort对于这种文件的排序合并提供了一个优化合并算法： 使用 -m merge合并选项，<br />
因此：合并这样格式的3个日志文件log1 log2 log3并输出到log_all中比较好方法是：<br />
sort -m -t &#8221; &#8221; -k 4 -o log_all log1 log2 log3<br />
注释：<br />
-m: 使用 merge优化算法</p>
<p>注意：合并后的日志输出最好压缩以后再发给<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a>处理<br />
有的系统能处理2G的文件，有的不能。有的程序能处理大于2G的文件，有的不能。尽量避免大于2G的文件，除非确认所有参与处理的程序和操作系统都能处理 这样的文件。所以输出后的文件如果大于2G，最好将日志gzip后再发给<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a>处理：大于2G的文件分析过程中文件系统出错的可能性比较大， 并且gzip后也能大大降低分析期间的I/O操作。</p>
<p>日志的按时间排序合并就是这样实现的。</p>
<h2><strong> 日志的轮循机制</strong></h2>
<p><strong> </strong> 让我们关心一下数据源问题：<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a>其实是一个按月统计的工具，支持增量统计：因此对于大型的服务，我可以按天将<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>的日志合并后送给 <a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a>统计。WEB日志是如何按天（比如每天子夜00:00:00）截断呢？<br />
如果你每天使用crontab：每天0点准时将日志备份成access_log_yesterday<br />
mv /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/log/access_log /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/log/access_log_yesterday<br />
的话：你还需要：马上运行一下：<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a> restart 否则：<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>会因为的日志文件句柄丢失不知道将日志记录到哪里去了。这样归档每天子夜重启<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>服务会受到影响。<br />
比较简便不影响服务的方法是：先复制，后清空<br />
cp /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/log/access_log /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/log/access_log_yesterday<br />
echo &gt;/path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/log/access_log</p>
<p>严肃的分析员会这样做发现一个问题：<br />
但cp不可能严格保证严格的0点截断。加入复制过程用了6秒，截断的access_log_yesterday日志中会出现复制过程到00:00:06期 间的日志。对于单个日志统计这些每天多出来几百行日志是没有问题的。但对于多个日志在跨月的1天会有一个合并的排序问题：<br />
[31/Mar/2002:59:59:59 +0800]<br />
[31/Mar/2002:23:59:59 +0800]<br />
[01/Apr/2002:00:00:00 +0800]<br />
[01/Apr/2002:00:00:00 +0800]</p>
<p>要知道[01/Apr/2002:00:00:00 这个字段是不可以进行“跨天排序”的。因为日期中使用了dd/mm/yyyy，月份还是英文名，如果按照字母排序，很有可能是这样的结果：排序导致了日志 的错误<br />
[01/Apr/2002:00:00:00 +0800]<br />
[01/Apr/2002:00:00:00 +0800]<br />
[01/Apr/2002:00:00:00 +0800]<br />
[01/Apr/2002:00:00:00 +0800]<br />
[01/Apr/2002:00:00:00 +0800]<br />
[01/Apr/2002:00:00:00 +0800]<br />
[01/Apr/2002:00:00:00 +0800]<br />
[31/Mar/2002:59:59:59 +0800]<br />
[31/Mar/2002:59:59:59 +0800]<br />
[31/Mar/2002:23:59:59 +0800]<br />
[31/Mar/2002:59:59:59 +0800]<br />
[31/Mar/2002:23:59:59 +0800]</p>
<p>这些跨天过程中的非正常数据对于<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a>等分析工具来说简直就好像是吃了一个臭虫一样，运行的结果是：它可能会把前一个月所有的数据都丢失！因 此这样的数据会有很多风险出现在处理上月最后一天的数据的过程中。</p>
<p>问题的解决有几个思路：<br />
1 事后处理：<br />
。所以一个事后的处理的方法是：用grep命令在每月第1天将日志跨月的日志去掉，比如：<br />
grep -v &#8220;01/Apr&#8221; access_log_04_01 &gt; access_log_new</p>
<p>修改SORT后的日志:所有跨天的数据去掉。也许对日志的事后处理是一个途径，虽然sort命令中有对日期排序的特殊选项 -M（注意是：大写M），可以让指定字段按照英文月份排序而非字母顺序，但对于<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>日志来说，用SORT命令切分出月份字段很麻烦。（我尝试过用 &#8220;/&#8221;做分割符，并且使用“月份” “年:时间”这两个字段排序）。虽然用一些PERL的脚本肯定可以实现，但最终我还是放弃了。这不符合系统管理员的设计原则：通用性。 并且你需要一直问自己：有没有更简单的方法呢？<br />
还有就是将日志格式改成用TIMESTAMP（象<a href="http://www.8next.com/archives/tag/squid" class="st_tag internal_tag" rel="tag" title="Posts tagged with squid">SQUID</a>的日志就没有这个问题，它的日志本身就是使用TIMESTAMP做时间时间戳的），但我无法保 证所有的日志工具都能识别你在日期这个字段使用了特别的格式。</p>
<p>2 优化数据源：<br />
最好的办法还是优化数据源。将数据源保证按天轮循，同一天的日志中的数据都在同一天内。这样以后你无论使用什么工具（商业的，免费的）来分析日志，都不会 因为日志复杂的预处理机制受到影响。</p>
<p>首先可能会想到的是控制截取日志的时间：比如严格从0点开始截取日志，但在子夜前1分钟还是后一分钟开始截取是没有区别的，你仍然无法控制一个日志中有跨 2天记录的问题，而且你也无法预测日志归档过程使用的时间。<br />
因此必须要好好考虑一下使用日志轮循工具的问题，这些日志轮循工具要符合：<br />
1 不中断WEB服务：不能停<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>=&gt;移动日志=&gt;重启<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a><br />
2 保证同一天日志能够按天轮循：每天一个日志00:00:00-23:59:59<br />
3 不受<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>重启的影响：如果<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>每次重启都会生成一个新的日志是不符合要求的<br />
4 安装配置简单</p>
<p>首先考虑了<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/bin目录下自带的一个轮循工具：rotatelogs 这个工具基本是用来按时间或按大小控制日志的，无法控制何时截断和如何按天归档。<br />
然后考虑logrotate后台服务：logrotate是一个专门对各种系统日志（syslogd，mail）进行轮循的后台服务，比如SYSTEM LOG，但其配置比较复杂，放弃，实际上它也是对相应服务进程发出一个-HUP重启命令来实现日志的截断归档的。</p>
<p>在<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>的FAQ中，推荐了经过近2年发展已经比较成熟的一个工具<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>：安装很简单：configure=&gt;make=&gt; make install</p>
<p>他的一个配置的例子会让你了解它有多么适合日志按天轮循：对<a href="http://www.8next.com/archives/tag/httpd" class="st_tag internal_tag" rel="tag" title="Posts tagged with httpd">httpd</a>.conf做一个很小的修改就能实现：<br />
TransferLog &#8220;|/usr/sbin/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> /web/logs/%Y/%m/%d/access.log&#8221;<br />
ErrorLog &#8220;|/usr/sbin/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> /web/logs/%Y/%m/%d/errors.log&#8221;</p>
<p>然后：日志将写入<br />
/web/logs/2002/12/31/access.log<br />
/web/logs/2002/12/31/errors.log<br />
午夜过后：日志将写入<br />
/web/logs/2003/01/01/access.log<br />
/web/logs/2003/01/01/errors.log<br />
而2003 2003/01 和 2003/01/01 如果不存在的话，将自动创建</p>
<p>所以，只要你不在0点调整系统时间之类的话，日志应该是完全按天存放的（00:00:00-23:59:59），后面日志分析中： [31/Mar/2002:15:44:59这个字段就和日期无关了，只和时间有关。</p>
<p>测试：考虑到系统硬盘容量，决定按星期轮循日志<br />
<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>配置中加入：<br />
#%w weekday<br />
TransferLog "|/usr/sbin/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs/%w/access_log"</p>
<p>重启<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>后，除了原来的CustomLog /path/to/apche/logs/access_log继续增长外，系统log目录下新建立了 3/目录（测试是在周3），过了一会儿，我忽然发现2个日志的增长速度居然不一样！<br />
分别tail了2个日志才发现：<br />
我设置CustomLog使用的是combined格式，就是包含（扩展信息的），而TransferLog使用的是缺省日志格式，看了<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>的手 册才知道，TransferLog是用配置文件中离它自己最近的一个格式作为日志格式的。我的<a href="http://www.8next.com/archives/tag/httpd" class="st_tag internal_tag" rel="tag" title="Posts tagged with httpd">httpd</a>.conf里写的是：<br />
LogFormat ..... combined<br />
LogFormat ... common<br />
...<br />
CustomLog ... combined<br />
TransferLog ...</p>
<p>所以TrasferLog日志用的是缺省格式，手册里说要让TRANSFER日志使用指定的格式需要：<br />
LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\""<br />
TransferLog "|/usr/local/sbin/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs/%w/access_log"</p>
<p>重启，OK，日志格式一样了。<br />
这样的设置结果其实是同时在logs目录下分别记录2个日志access_log和%w/access_log，能不能只记录%w/下的日志那？<br />
查<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>手册，更简单的方法：直接让CustomLog输出到<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>归档日志，并且还能指定格式。<br />
CustomLog "|/usr/local/sbin/<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs/%w/access_log" combined</p>
<p>最后是一个日志同步的问题。</p>
<p>任务：每天凌晨找到前1天的日志，另存一个文件准备发送到服务器上。<br />
比如我要保留前1周的日志：每天复制前1天的日志到指定目录，等待日志服务器来抓取：<br />
/bin/cp -f /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs/`date -v-1d +%w`/access_log /path/for/backup/logs/access_log_yesterday</p>
<p>在FREEBSD上使用以下命令<br />
date -v-1d +%w<br />
注释：<br />
-v-1d: 前1天，而在GNU/<a href="http://www.8next.com/archives/tag/linux" class="st_tag internal_tag" rel="tag" title="Posts tagged with linux">Linux</a>上这个选项应该是date -d yesterday<br />
+%w: weekday，由于使用的都是标准时间函数库，所有工具中的WEEKDAY定义都是一样的 0-6 =&gt; 周日－周六</p>
<p>注意：<br />
写到CRONTAB里的时候"%"前面需要加一个"\"转义：每天0点5分进行一次日志归档，<br />
另外一个问题就是在cront中需要用：rm -f {} ; 而不是rm -f {}\;<br />
5 0 * * * /bin/cp /path/to/logs/`date -v-1d +\%w`/access_log /path/to/for_sync/logs/access_yesterday<br />
37 10 * * * /usr/bin/find /home/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs/ -name access_log -mtime +1 -exec /bin/rm -f {} ;</p>
<p>首次开始<a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a>日志统计是周3，一周以后日志又将轮循回3/access_log<br />
但这次日志是追加到3/access_log还是重新创建一个文件呢？&gt;&gt;access_log or &gt;access_log？<br />
我测试的结果是日志将被追加：<br />
[01/Apr/2002:23:59:59 +0800]<br />
[01/Apr/2002:23:59:59 +0800]<br />
[08/Apr/2002:00:00:00 +0800]<br />
[08/Apr/2002:00:00:00 +0800]</p>
<p>肯定是不希望每次日志还带着上周的数据的并重复统计一次的（虽然对结果没影响），而且这样%w/下的日志不是也越来越多了吗？<br />
解决方法1 把每天的cp改成mv<br />
解决方法2 每天复制完成后：删除6天以前的access_log日志<br />
find /path/to/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs -name access_log -mtime +6 -exec rm -f {}\;<br />
多保留几天的日志还是有必要的：万一日志分析服务器坏了一天呢？</p>
<p>以下是把<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>安装在/home/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>下每天统计的一个脚本文件：<br />
#!/bin/sh</p>
<p>#backup old log<br />
/bin/cp -f /home/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs/`date -d yesterday +%w`/access_log /home/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs/access_log_yesterday</p>
<p>#remove old log<br />
/usr/bin/find /home/<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">apache</a>/logs -name access_log -mtime +6 -exec rm -f {}\;</p>
<p>#analysis with <a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a><br />
/usr/local/sbin/<a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">webalizer</a></p>
<p>总结：<br />
1 用 <a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">cronolog</a> 干净，安全地轮循日志<br />
2 用 sort -m 排序合并多个日志</p>
<p>参考资料：</p>
<p>日志分析统计工具：<br />
<a href="http://directory.google.com/Top/Computers/Software/Internet/Site_Management/Log_Analysis/">http://directory.google.com/Top/Computers/Software/Internet/Site_Management/Log_Analysis/</a></p>
<p>Apche的日志设置：<br />
<a href="http://httpd.apache.org/docs/mod/mod_log_config.html">http://httpd.apache.org/docs/mod/mod_log_config.html</a></p>
<p><a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>的日志轮循：<br />
<a href="http://httpd.apache.org/docs/misc/FAQ.html#rotate">http://httpd.apache.org/docs/misc/FAQ.html#rotate</a></p>
<p><a href="http://www.8next.com/archives/tag/cronolog" class="st_tag internal_tag" rel="tag" title="Posts tagged with cronolog">Cronolog</a><br />
<a href="http://www.cronolog.org/">http://www.cronolog.org<br />
</a></p>
<p><a href="http://www.8next.com/archives/tag/webalizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with webalizer">Webalizer</a><br />
<a href="http://www.mrunix.net/webalizer/">http://www.mrunix.net/webalizer/</a><br />
Webalzer的Windows版<br />
<a href="http://www.medasys-lille.com/webalizer/">http://www.medasys-lille.com/webalizer/</a></p>
<p>AWStats的使用简介<br />
<a href="http://www.chedong.com/tech/awstats.html">http://www.chedong.com/tech/awstats.html</a></div>
</div>

	Tags: <a href="http://www.8next.com/archives/tag/apache" title="apache" rel="tag">apache</a>, <a href="http://www.8next.com/archives/tag/cronolog" title="cronolog" rel="tag">cronolog</a>, <a href="http://www.8next.com/archives/tag/unique-visits" title="unique visits" rel="tag">unique visits</a>, <a href="http://www.8next.com/archives/tag/webalizer" title="webalizer" rel="tag">webalizer</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2993" title="安装cronolog,格式化Apache的日志文件 (November 26, 2008)">安装cronolog,格式化Apache的日志文件</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1906" title="浅析Apache中SSI和CGI的设定方法 (August 13, 2008)">浅析Apache中SSI和CGI的设定方法</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2890" title="Subversion1.3.2安装以及配置 (October 21, 2008)">Subversion1.3.2安装以及配置</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2943" title="openssl自建证书SSL+apache (October 29, 2008)">openssl自建证书SSL+apache</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2989" title="Nginx的Rewrite设置及示例 (November 21, 2008)">Nginx的Rewrite设置及示例</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2991/feed</wfw:commentRss>
		</item>
		<item>
		<title>Nginx的Rewrite设置及示例</title>
		<link>http://www.8next.com/archives/2989</link>
		<comments>http://www.8next.com/archives/2989#comments</comments>
		<pubDate>Fri, 21 Nov 2008 07:10:13 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Unix Like]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[nginx]]></category>

		<category><![CDATA[rewrite]]></category>

		<category><![CDATA[tag html]]></category>

		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2989</guid>
		<description><![CDATA[

Nginx以其良好的并发性能，目前正在逐渐取代Apache成为大家的Web server首选，但是Nginx目前的中文资料很少，需要大家努力贡献。

下面我介绍一下Nginx的Rewrite模块设置及Wordpress和Discuz的示例... ]]></description>
			<content:encoded><![CDATA[<div class="entry-body">
<p><a href="http://www.8next.com/archives/tag/nginx" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">Nginx</a>以其良好的并发性能，目前正在逐渐取代<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>成为大家的<a href="http://www.8next.com/archives/tag/web-server" class="st_tag internal_tag" rel="tag" title="Posts tagged with web server">Web server</a>首选，但是<a href="http://www.8next.com/archives/tag/nginx" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">Nginx</a>目前的中文资料很少，需要大家努力贡献。</p>
<p>下面我介绍一下<a href="http://www.8next.com/archives/tag/nginx" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">Nginx</a>的<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">Rewrite</a>模块设置及Wordpress和Discuz的示例。<a href="http://www.8next.com/archives/tag/nginx" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">Nginx</a>的<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">Rewrite</a>规则比<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>的简单灵活多了，从下面介绍可见一斑。</p>
<p>首先，<a href="http://www.8next.com/archives/tag/nginx" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">Nginx</a>可以用if进行条件匹配，语法规则类似C，举例如下：</p>
<pre class="prettyprint"><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">$http_user_agent </span><span class="pun">~</span><span class="pln"> MSIE</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a>  </span><span class="pun">^(.*)</span><span class="pln">$  </span><span class="pun">/</span><span class="pln">msie</span><span class="pun">/</span><span class="pln">$1  </span><span class="kwd">break</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span></pre>
<p>1、正则表达式匹配，其中：</p>
<ul>
<li> ~  为区分大小写匹配</li>
<li> ~* 为不区分大小写匹配</li>
<li> !~和!~*分别为区分大小写不匹配及不区分大小写不匹配</li>
</ul>
<p>2、文件及目录匹配，其中：</p>
<ul>
<li> -f和!-f用来判断是否存在文件</li>
<li> -d和!-d用来判断是否存在目录</li>
<li> -e和!-e用来判断是否存在文件或目录</li>
<li> -x和!-x用来判断文件是否可执行</li>
</ul>
<p>如：</p>
<pre class="prettyprint"><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!-</span><span class="pln">f $request_filename</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
proxy_pass  http</span><span class="pun">:</span><span class="com">//127.0.0.1;</span><span class="pln">
</span><span class="pun">}</span></pre>
<p>其次，<a href="http://www.8next.com/archives/tag/nginx" class="st_tag internal_tag" rel="tag" title="Posts tagged with nginx">Nginx</a>的<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">Rewrite</a>规则与<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>几乎完全一致，所不同的是最后的flag标记，举例如下：</p>
<blockquote><p><a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> ^/feed/$ http://feed.shunz.net last;</p></blockquote>
<p>flag标记有：</p>
<ul>
<li>last 相当于<a href="http://www.8next.com/archives/tag/apache" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache">Apache</a>里的[L]标记，表示完成<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a>，不再匹配后面的规则</li>
<li>break 与last类似</li>
<li>redirect 返回302临时重定向</li>
<li>permanent 返回301永久重定向</li>
</ul>
<p>Wordpress的重定向规则：</p>
<pre class="prettyprint"><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!-</span><span class="pln">e $request_filename</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^/(</span><span class="pln">index</span><span class="pun">|</span><span class="pln">atom</span><span class="pun">|</span><span class="pln">rsd</span><span class="pun">)\.</span><span class="pln">xml$ http</span><span class="pun">:</span><span class="com">//feed.shunz.net last;</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^([</span><span class="pln">_0</span><span class="pun">-</span><span class="lit">9a</span><span class="pun">-</span><span class="pln">zA</span><span class="pun">-</span><span class="pln">Z</span><span class="pun">-]+)?(/</span><span class="pln">wp</span><span class="pun">-.*)</span><span class="pln"> $2 last</span><span class="pun">;</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^([</span><span class="pln">_0</span><span class="pun">-</span><span class="lit">9a</span><span class="pun">-</span><span class="pln">zA</span><span class="pun">-</span><span class="pln">Z</span><span class="pun">-]+)?(/.*\.</span><span class="pln"><a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a></span><span class="pun">)</span><span class="pln">$ $2 last</span><span class="pun">;</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^</span><span class="pln"> </span><span class="pun">/</span><span class="pln">index</span><span class="pun">.</span><span class="pln"><a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a> last</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span></pre>
<p>Discuz!的重定向规则：</p>
<pre class="prettyprint"><span class="kwd">if</span><span class="pln"> </span><span class="pun">(!-</span><span class="pln">f $request_filename</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^/</span><span class="pln">archiver</span><span class="pun">/((</span><span class="pln">fid</span><span class="pun">|</span><span class="pln">tid</span><span class="pun">)-[\</span><span class="pln">w</span><span class="pun">\-]+\.</span><span class="pln">html</span><span class="pun">)</span><span class="pln">$   </span><span class="pun">/</span><span class="pln">archiver</span><span class="pun">/</span><span class="pln">index</span><span class="pun">.</span><span class="pln"><a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a></span><span class="pun">?</span><span class="pln">$1 last</span><span class="pun">;</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^/</span><span class="pln">forum</span><span class="pun">-([</span><span class="lit">0</span><span class="pun">-</span><span class="lit">9</span><span class="pun">]+)-([</span><span class="lit">0</span><span class="pun">-</span><span class="lit">9</span><span class="pun">]+)\.</span><span class="pln">html$   </span><span class="pun">/</span><span class="pln">forumdisplay</span><span class="pun">.</span><span class="pln"><a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a></span><span class="pun">?</span><span class="pln">fid</span><span class="pun">=</span><span class="pln">$1</span><span class="pun">&amp;</span><span class="pln">page</span><span class="pun">=</span><span class="pln">$2 last</span><span class="pun">;</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^/</span><span class="kwd">thread</span><span class="pun">-([</span><span class="lit">0</span><span class="pun">-</span><span class="lit">9</span><span class="pun">]+)-([</span><span class="lit">0</span><span class="pun">-</span><span class="lit">9</span><span class="pun">]+)-([</span><span class="lit">0</span><span class="pun">-</span><span class="lit">9</span><span class="pun">]+)\.</span><span class="pln">html$  </span><span class="pun">/</span><span class="pln">viewthread</span><span class="pun">.</span><span class="pln"><a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a></span><span class="pun">?</span><span class="pln">tid</span><span class="pun">=</span><span class="pln">$1</span><span class="pun">&amp;</span><span class="pln">extra</span><span class="pun">=</span><span class="pln">page</span><span class="pun">%</span><span class="lit">3D</span><span class="pln">$3</span><span class="pun">&amp;</span><span class="pln">page</span><span class="pun">=</span><span class="pln">$2 last</span><span class="pun">;</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^/</span><span class="pln">space</span><span class="pun">-(</span><span class="pln">username</span><span class="pun">|</span><span class="pln">uid</span><span class="pun">)-(.+)\.</span><span class="pln">html$   </span><span class="pun">/</span><span class="pln">space</span><span class="pun">.</span><span class="pln"><a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a></span><span class="pun">?</span><span class="pln">$1</span><span class="pun">=</span><span class="pln">$2 last</span><span class="pun">;</span><span class="pln">
<a href="http://www.8next.com/archives/tag/rewrite" class="st_tag internal_tag" rel="tag" title="Posts tagged with rewrite">rewrite</a> </span><span class="pun">^/</span><span class="pln">tag</span><span class="pun">-(.+)\.</span><span class="pln">html$ </span><span class="pun">/</span><span class="pln">tag</span><span class="pun">.</span><span class="pln"><a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a></span><span class="pun">?</span><span class="pln">name</span><span class="pun">=</span><span class="pln">$1 last</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span></pre>
</div>
<div class="alimama"><script src="http://shunz.net/js/myalimama_post.js" type="text/JavaScript"></script> <script src="http://a.alimama.cn/inf.js" type="text/javascript"></script></div>
<p><!--Begin related post,if you'v install the plugin,here will show the related post.Plugin download at:http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/--></p>

	Tags: <a href="http://www.8next.com/archives/tag/apache" title="apache" rel="tag">apache</a>, <a href="http://www.8next.com/archives/tag/nginx" title="nginx" rel="tag">nginx</a>, <a href="http://www.8next.com/archives/tag/rewrite" title="rewrite" rel="tag">rewrite</a>, <a href="http://www.8next.com/archives/tag/tag-html" title="tag html" rel="tag">tag html</a>, <a href="http://www.8next.com/archives/tag/web-server" title="web server" rel="tag">web server</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2921" title="nginx初试及apache对比测试 (October 29, 2008)">nginx初试及apache对比测试</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2111" title="nginx+apache+mysql+php+memcached+squid搭建门户网站 (August 19, 2008)">nginx+apache+mysql+php+memcached+squid搭建门户网站</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2917" title="Nginx 0.7.x+PHP5.2.6+MySQL5.1小内存的配置优化 (October 29, 2008)">Nginx 0.7.x+PHP5.2.6+MySQL5.1小内存的配置优化</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2996" title="apache服务器使用.htaccess实现图片防盗链教程 (November 27, 2008)">apache服务器使用.htaccess实现图片防盗链教程</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2782" title="Apache vs Nginx : Web Server Performance Deathmatch (October 2, 2008)">Apache vs Nginx : Web Server Performance Deathmatch</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2989/feed</wfw:commentRss>
		</item>
		<item>
		<title>一款可爱的放气球的休闲游戏</title>
		<link>http://www.8next.com/archives/2983</link>
		<comments>http://www.8next.com/archives/2983#comments</comments>
		<pubDate>Fri, 21 Nov 2008 05:38:47 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[MobilePhone]]></category>

		<category><![CDATA[ipa]]></category>

		<category><![CDATA[iphone]]></category>

		<category><![CDATA[iTunes]]></category>

		<category><![CDATA[YumBalloon]]></category>

		<category><![CDATA[游戏]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2983</guid>
		<description><![CDATA[YumBalloon v1.0_ Phone软件分享 _威锋网.cPopText { font-family: Tahoma, Verdana; background-color: #FFFFCC; border: 1px #000000 solid; font-size: 12px; padding-right: 4px; padding-left: 4px; line-heigh..... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.8next.com/archives/tag/yumballoon" class="st_tag internal_tag" rel="tag" title="Posts tagged with YumBalloon">YumBalloon</a> v1.0_ Phone软件分享 _威锋网<script src="/images/jquery.js"></script><script src="/images/function.js"></script>.cPopText { font-family: Tahoma, Verdana; background-color: #FFFFCC; border: 1px #000000 solid; font-size: 12px; padding-right: 4px; padding-left: 4px; line-height: 18px; padding-top: 2px; padding-bottom: 2px; visibility: hidden; height:20px;width:200px; filter: Alpha(Opacity=80)}</p>
<div id="top_ad">
<div class="topwrap">
<div id="top_ad_bg">
<div id="l">
<div id="r">
<div id="ad">
<div class="topad-wrap">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="topadimg"></td>
<td class="topadimg"></td>
<td width="98%"></td>
<td class="topadimg"></td>
<td class="topadimg"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="wrapper">
<div class="content">
<div class="entry">
<div id="a1" class="product_select">
<div class="apps-box">
<h2 class="fb blue f16"><a href="http://www.8next.com/archives/tag/yumballoon" class="st_tag internal_tag" rel="tag" title="Posts tagged with YumBalloon">YumBalloon</a> v1.0</h2>
<p class="fb">一款可爱的放气球的休闲游戏</p>
<p><script src="http://news.weiphone.com/publish/fav.js" type="text/javascript"></script></div>
</div>
</div>
<div class="entry">
<p><a href="http://www.8next.com/wp-content/uploads/2008/11/1338464wr.jpg" target="_blank"><br />
</a><a href="http://www.8next.com/wp-content/uploads/2008/11/1338464wr.jpg" target="_blank"><img onclick="if(!this.resized) {return true;}" onmouseover="if(this.width&gt;500) {this.resized=true; this.width=400; this.style.cursor='hand'; this.alt='Click here to open new window CTRL+Mouse wheel to zoom in/out/点击这里打开一个新的窗口观看,可以使用CTRL+鼠标滚动来放大或缩小';}" src="http://www.8next.com/wp-content/uploads/2008/11/1338464wr.jpg" border="0" alt="" /></a></p>
<p><a href="http://www.8next.com/wp-content/uploads/2008/11/133847yy4.jpg" target="_blank"></a><a href="http://www.8next.com/wp-content/uploads/2008/11/133847yy4.jpg" target="_blank"><img onclick="if(!this.resized) {return true;}" onmouseover="if(this.width&gt;500) {this.resized=true; this.width=400; this.style.cursor='hand'; this.alt='Click here to open new window CTRL+Mouse wheel to zoom in/out/点击这里打开一个新的窗口观看,可以使用CTRL+鼠标滚动来放大或缩小';}" src="http://www.8next.com/wp-content/uploads/2008/11/133847yy4.jpg" border="0" alt="" /></a></p>
<p>统一程序安装方法：</p>
<p>①.APP格式：<br />
1,利用WINSCP上传XXXX.app文件夹到/Applications下<br />
2,设置该文件夹和内部主文件（也就是和文件夹名称相同的文件）权限为775<br />
3,Respring/Reboot</p>
<p>②<a href="http://www.8next.com/archives/tag/ipa" class="st_tag internal_tag" rel="tag" title="Posts tagged with ipa">IPA</a>格式：（推荐）<br />
1,利用WINSCP替换<a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iphone</a>里路径为/System/Library/PrivateFrameworks/MobileInstallation.framework里<br />
mobileinstallation文件并改权限755（机器重启生效，附：2.0X和2.0文件不一样）<br />
2,mobileinstallation文件下载连接：<br />
<a href="http://www.weiphone.com/viewthread.php?tid=112793&amp;page=1">http://www.weiphone.com/viewthread.php?tid=112793&amp;page=1</a><br />
3,鼠标右键双击文件或者直接把<a href="http://www.8next.com/archives/tag/ipa" class="st_tag internal_tag" rel="tag" title="Posts tagged with ipa">ipa</a>文件拉进<a href="http://www.8next.com/archives/tag/itunes" class="st_tag internal_tag" rel="tag" title="Posts tagged with iTunes">itunes</a>的应用文件,文件即导入<a href="http://www.8next.com/archives/tag/itunes" class="st_tag internal_tag" rel="tag" title="Posts tagged with iTunes">itunes</a><br />
4,电脑同步即可.（安装破解软件前请先安装免费软件一个）</div>
</div>
</div>

	Tags: <a href="http://www.8next.com/archives/tag/ipa" title="ipa" rel="tag">ipa</a>, <a href="http://www.8next.com/archives/tag/iphone" title="iphone" rel="tag">iphone</a>, <a href="http://www.8next.com/archives/tag/itunes" title="iTunes" rel="tag">iTunes</a>, <a href="http://www.8next.com/archives/tag/yumballoon" title="YumBalloon" rel="tag">YumBalloon</a>, <a href="http://www.8next.com/archives/tag/%e6%b8%b8%e6%88%8f" title="游戏" rel="tag">游戏</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2642" title="超級賽車ASPHALT4无法联机的解决方法 (September 5, 2008)">超級賽車ASPHALT4无法联机的解决方法</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2674" title="《契约OL》强势进军iPhone平台 (September 5, 2008)">《契约OL》强势进军iPhone平台</a> (3)</li>
	<li><a href="http://www.8next.com/archives/2979" title="iTunes发布新版本 为2.2固件做准备？ (November 21, 2008)">iTunes发布新版本 为2.2固件做准备？</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1940" title="ipa文件的安装方法 (August 14, 2008)">ipa文件的安装方法</a> (5)</li>
	<li><a href="http://www.8next.com/archives/2618" title="Digg创始人透露iTunes 8 新功能 (September 4, 2008)">Digg创始人透露iTunes 8 新功能</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2983/feed</wfw:commentRss>
		</item>
		<item>
		<title>iTunes发布新版本 为2.2固件做准备？</title>
		<link>http://www.8next.com/archives/2979</link>
		<comments>http://www.8next.com/archives/2979#comments</comments>
		<pubDate>Fri, 21 Nov 2008 05:29:32 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[MobilePhone]]></category>

		<category><![CDATA[2.2]]></category>

		<category><![CDATA[Apple]]></category>

		<category><![CDATA[iphone]]></category>

		<category><![CDATA[iTunes]]></category>

		<category><![CDATA[固件]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2979</guid>
		<description><![CDATA[Apple发布了iTunes的新版本8.0.2. 这个更新可以在你MacOS X的software update中更新.

iTunes 8.0.2改进了可靠性和运行效率, 还修复了几个bug.


-解决了某些电脑上创建Mp3的质量问题
-修正了当使用某些... ]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: x-small;"><a href="http://www.8next.com/archives/tag/apple" class="st_tag internal_tag" rel="tag" title="Posts tagged with Apple">Apple</a><span style="font-family: 宋体;">发布了</span><a href="http://www.8next.com/archives/tag/itunes" class="st_tag internal_tag" rel="tag" title="Posts tagged with iTunes">iTunes</a><span style="font-family: 宋体;">的新版本</span>8.0.2. <span style="font-family: 宋体;">这个更新可以在你</span>MacOS X<span style="font-family: 宋体;">的</span>software update<span style="font-family: 宋体;">中更新</span>.</span></p>
<div class="t_msgfont"><span style="font-size: x-small;"><br />
<a href="http://www.8next.com/archives/tag/itunes" class="st_tag internal_tag" rel="tag" title="Posts tagged with iTunes">iTunes</a> 8.0.2<span style="font-family: 宋体;">改进了可靠性和运行效率</span>, <span style="font-family: 宋体;">还修复了几个</span>bug.</span></div>
<div class="t_msgfont">
<p><span style="font-size: x-small;">-<span style="font-family: 宋体;">解决了某些电脑上创建</span>Mp3<span style="font-family: 宋体;">的质量问题</span><br />
-<span style="font-family: 宋体;">修正了当使用某些代理服务器时候</span><a href="http://www.8next.com/archives/tag/itunes" class="st_tag internal_tag" rel="tag" title="Posts tagged with iTunes">iTunes</a><span style="font-family: 宋体;">与</span><a href="http://www.8next.com/archives/tag/itunes" class="st_tag internal_tag" rel="tag" title="Posts tagged with iTunes">iTunes</a> Store<span style="font-family: 宋体;">的连接问题</span><br />
-<span style="font-family: 宋体;">改进了</span>VoiceOver<span style="font-family: 宋体;">的易用性</span></span></div>
<div class="t_msgfont">
<p><span style="font-size: x-small;"><span style="font-family: 宋体;">另</span>: <span style="font-family: 宋体;">这个更新出现在</span><a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iPhone</a> <a href="http://www.8next.com/archives/tag/22" class="st_tag internal_tag" rel="tag" title="Posts tagged with 2.2">2.2</a> <span style="font-family: 宋体;">固件发布流言的前一天</span></span></p>
<p><a href="http://news.weiphone.com/news/2008-11-21/iTunesfabuxinbanben_wei2.2gujianzuozhunbei_144645.shtml#zoom"> <img onclick="zoom(this, 'http://www.8next.com/wp-content/uploads/2008/11/132932ave.jpg')" onmouseover="if(this.width&gt;500) {this.resized=true; this.width=400; this.style.cursor='hand'; this.alt='Click here to open new window CTRL+Mouse wheel to zoom in/out/点击这里打开一个新的窗口观看,可以使用CTRL+鼠标滚动来放大或缩小';}" src="http://www.8next.com/wp-content/uploads/2008/11/132932ave.jpg" border="0" alt="" width="400" /></a></div>

	Tags: <a href="http://www.8next.com/archives/tag/22" title="2.2" rel="tag">2.2</a>, <a href="http://www.8next.com/archives/tag/apple" title="Apple" rel="tag">Apple</a>, <a href="http://www.8next.com/archives/tag/iphone" title="iphone" rel="tag">iphone</a>, <a href="http://www.8next.com/archives/tag/itunes" title="iTunes" rel="tag">iTunes</a>, <a href="http://www.8next.com/archives/tag/%e5%9b%ba%e4%bb%b6" title="固件" rel="tag">固件</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2642" title="超級賽車ASPHALT4无法联机的解决方法 (September 5, 2008)">超級賽車ASPHALT4无法联机的解决方法</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2983" title="一款可爱的放气球的休闲游戏 (November 21, 2008)">一款可爱的放气球的休闲游戏</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2616" title="winpwn-2.5beta2做的2.0.2固件 (September 1, 2008)">winpwn-2.5beta2做的2.0.2固件</a> (6)</li>
	<li><a href="http://www.8next.com/archives/1831" title="WinPwn 2.0.0.4 更新, 2.0.1固件破解图文教程！ (August 11, 2008)">WinPwn 2.0.0.4 更新, 2.0.1固件破解图文教程！</a> (1)</li>
	<li><a href="http://www.8next.com/archives/2743" title="iphone 固件 2.1破解总结教程 (September 14, 2008)">iphone 固件 2.1破解总结教程</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2979/feed</wfw:commentRss>
		</item>
		<item>
		<title>爆料倍出:第三代iPhone整机图</title>
		<link>http://www.8next.com/archives/2964</link>
		<comments>http://www.8next.com/archives/2964#comments</comments>
		<pubDate>Fri, 21 Nov 2008 05:28:26 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[MobilePhone]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2964</guid>
		<description><![CDATA[ 今天早些时候，在国外的APPLECAWO的博客中，我们又看到了吃惊的一幕：

第三代iPhone的图片被曝光？！不敢相信这是真的，但是又有些意外！
 
 其报道中也称：所谓的第三代iPhone，其实就是... ]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: x-small;"> 今天早些时候，在国外的APPLECAWO的博客中，我们又看到了吃惊的一幕：</span></p>
<p>第三代<a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iPhone</a>的图片被曝光？！不敢相信这是真的，但是又有些意外！<br />
<a href="http://news.weiphone.com/news/2008-11-21/baoliaobeichu_3AdisandaiiPhonezhengjitu_144647.shtml#zoom"> <img onclick="zoom(this, 'http://www.8next.com/wp-content/uploads/2008/11/1328263av.jpg')" onmouseover="if(this.width&gt;500) {this.resized=true; this.width=400; this.style.cursor='hand'; this.alt='Click here to open new window CTRL+Mouse wheel to zoom in/out/点击这里打开一个新的窗口观看,可以使用CTRL+鼠标滚动来放大或缩小';}" src="http://www.8next.com/wp-content/uploads/2008/11/1328263av.jpg" border="0" alt="" /></a><br />
<span style="font-size: x-small;"> 其报道中也称：所谓的第三代<a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iPhone</a>，其实就是现在<a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iPhone</a>的升级版本，是真正意义上的3G <a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iPhone</a>，从图片上可以清晰的看到<a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iPhone</a>的左上方有个前置摄像头，同时，图片中的照片是在利用3G的视频通话功能，进行视频通话~并透露不论从 更新版的3G的外观将植入前置摄像头，其余功能和硬件方面将会有一些细微的改进</span></p>
<p>但是,报道中也称道：<strong>硬件方面不会做太大的改动！！</strong>这可是和前面的关于更新版3G <a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iPhone</a>的内容格格不入啊~</p>
<p>下图为前段时间报道的有关更新版3G <a href="http://www.8next.com/archives/tag/iphone" class="st_tag internal_tag" rel="tag" title="Posts tagged with iphone">iPhone</a>的曝光外壳图片：<br />
<a href="http://news.weiphone.com/news/2008-11-21/baoliaobeichu_3AdisandaiiPhonezhengjitu_144647.shtml#zoom"> <img onclick="zoom(this, 'http://www.8next.com/wp-content/uploads/2008/11/1328260u8.jpg')" onmouseover="if(this.width&gt;500) {this.resized=true; this.width=400; this.style.cursor='hand'; this.alt='Click here to open new window CTRL+Mouse wheel to zoom in/out/点击这里打开一个新的窗口观看,可以使用CTRL+鼠标滚动来放大或缩小';}" src="http://www.8next.com/wp-content/uploads/2008/11/1328260u8.jpg" border="0" alt="" /></a></p>
No tags for this post.
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li>No related posts.</li>
	</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2964/feed</wfw:commentRss>
		</item>
		<item>
		<title>Android 0.8 on HTC Diamond</title>
		<link>http://www.8next.com/archives/2957</link>
		<comments>http://www.8next.com/archives/2957#comments</comments>
		<pubDate>Fri, 21 Nov 2008 05:27:19 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[MobilePhone]]></category>

		<category><![CDATA[Android]]></category>

		<category><![CDATA[diamond]]></category>

		<category><![CDATA[HTC]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2957</guid>
		<description><![CDATA[I promised to put up some pictures and a link to the android v0.8 experimental linload. So here you go.
 ... ]]></description>
			<content:encoded><![CDATA[<p class="tightenable top">I promised to put up some pictures and a link to the <a class="namedurl" href="http://www.xs4all.nl/%7ewimstolk/raphael/raph_20081103_android_v0.8_experimental.exe"><span style="white-space: nowrap;"><img class="linkicon" src="http://www.8next.com/wp-content/uploads/2008/11/1327142uu.png" border="0" alt="" />android</span> v0.8 experimental linload</a>. So here you go.</p>
<p class="tightenable bottom"><img class="inlineimage" src="http://www.8next.com/wp-content/uploads/2008/11/132716m0v.jpg" alt="http://www.8next.com/wp-content/uploads/2008/11/132716m0v.jpg" /> <img class="inlineimage" src="http://www.8next.com/wp-content/uploads/2008/11/132717o8j.jpg" alt="http://www.8next.com/wp-content/uploads/2008/11/132717o8j.jpg" /> <img class="inlineimage" src="http://www.8next.com/wp-content/uploads/2008/11/132719vyk.jpg" alt="http://www.8next.com/wp-content/uploads/2008/11/132719vyk.jpg" /></p>

	Tags: <a href="http://www.8next.com/archives/tag/android" title="Android" rel="tag">Android</a>, <a href="http://www.8next.com/archives/tag/diamond" title="diamond" rel="tag">diamond</a>, <a href="http://www.8next.com/archives/tag/htc" title="HTC" rel="tag">HTC</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2894" title="发现一个下载htc diamond rom的好地方 (October 22, 2008)">发现一个下载htc diamond rom的好地方</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2947" title="Linux on Raphael and Diamond (maybe Android) (October 31, 2008)">Linux on Raphael and Diamond (maybe Android)</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1938" title="谷歌Android把开发商赶向iPhone？ (August 14, 2008)">谷歌Android把开发商赶向iPhone？</a> (0)</li>
	<li><a href="http://www.8next.com/archives/17" title="对比最强HTC WM手机与iPhone (June 5, 2008)">对比最强HTC WM手机与iPhone</a> (0)</li>
	<li><a href="http://www.8next.com/archives/70" title="十款 Apple 3G iPhone 想象图赏（多图详解） (June 15, 2008)">十款 Apple 3G iPhone 想象图赏（多图详解）</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2957/feed</wfw:commentRss>
		</item>
		<item>
		<title>关于央视曝光百度竞价排名黑幕</title>
		<link>http://www.8next.com/archives/2962</link>
		<comments>http://www.8next.com/archives/2962#comments</comments>
		<pubDate>Fri, 21 Nov 2008 05:25:15 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[百度]]></category>

		<category><![CDATA[竞价排行]]></category>

		<category><![CDATA[黑幕]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2962</guid>
		<description><![CDATA[

央视的曝光首先是针对虚假广告的问题。虚假广告是真实存在的。但是问题是世界上 还没有任何媒体能够解决虚假广告的问题。央视的虚假广告也不是一般的多呀。央视不是还专门做过几期... ]]></description>
			<content:encoded><![CDATA[<div id="blog_text" class="cnt">
<p>央视的曝光首先是针对虚假广告的问题。虚假广告是真实存在的。但是问题是世界上 还没有任何媒体能够解决虚假广告的问题。央视的虚假广告也不是一般的多呀。央视不是还专门做过几期节目说三鹿怎么怎么好吗？怎么自己不检讨一下，反而到处 说别人？弄得自己像个烈妇，其实就是个婊子。这年头谁还相信央视的新闻呢？</p>
<p>要纠正一点，竞价排名不是钱出的越多排名就越前的。搜索引擎的商业模式不得于本面媒体，它是按点击收费的。所以客户出的钱再多，网民不点也没用。所以竞价排名必须同时考虑广告的质量及广告的价格两个因素决定排名。央视的新闻明显是在误导民众。</p>
<p>对于有些网站说自己被屏蔽，说以前可以搜到，现在要么排名很后，要么搜不到。这种现象是存在的，但是原因却是多种多样的。可能是因为调整了排名算 法，在《the search》里就专门描述因为<a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">google</a>调整排名算法而受影响的商家。也可能是因为用户使用了SEO，被屏蔽。所谓SEO，就是投机取巧让搜索引擎把 它放在前面，被发现了当然会被放到后面去，甚至屏蔽。还有可能是更好的网站出现了，自然就排到后面去了。至于里面说某网站接到百度的代理电话，拒绝参加竞 价排名后，就没有了百度流量，首先，有没有证据表白百度代理给他电话了？其次，有没有证据表白这两者存在前后因果联系？百度的推销员数以万计，这些人一天 到晚打电话给各个网站，如果某个网站说不参加竞价排名，则屏蔽，那百度上还能查到东西吗？一种更为合理的猜测是，百度发现这家网站做了SEO，然后想它给 钱SEO，不如给钱我，然后打电话过去，结果人家偏就要把钱给SEO，于是被屏蔽了。</p>
<p>在QQ的新闻里，还引用了天涯里的一个贴子《牛人揭秘：百度是这样保护三鹿等大客户的》。那篇贴子里完全没有任何证据，都是捕风捉影，那些所谓的 PPT，天知道是谁做的，那些截图就不可以PS吗？天涯很久以前就被<a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">GOOGLE</a>收购了，谁知道那是不是<a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">GOOGLE</a>在故意打击竞争对手呢？我应该PS一 个截图，说<a href="http://www.8next.com/archives/tag/google" class="st_tag internal_tag" rel="tag" title="Posts tagged with Google">GOOGLE</a>内部文件说要通过天涯打击BAIDU。我还可以PS一个图片说，淘宝内部文件说，马云说要请枪手打击百度，还可以淘宝内部文件说马 云给CCTV多少多少钱用于打击百度。</p>
<p>对于腾讯的这类新闻，我想问一下，有多少卖淫、卖毒品这类的非法行为是通为QQ的？多少无知少女在QQ上认识了狼友，然后遭遇不幸，那腾讯应该付多少责任？自己赚的钱不干净，还好意思说别人。还专门写那么多新闻说百度这不好，那不好。</p></div>

	Tags: <a href="http://www.8next.com/archives/tag/google" title="Google" rel="tag">Google</a>, <a href="http://www.8next.com/archives/tag/%e7%99%be%e5%ba%a6" title="百度" rel="tag">百度</a>, <a href="http://www.8next.com/archives/tag/%e7%ab%9e%e4%bb%b7%e6%8e%92%e8%a1%8c" title="竞价排行" rel="tag">竞价排行</a>, <a href="http://www.8next.com/archives/tag/%e9%bb%91%e5%b9%95" title="黑幕" rel="tag">黑幕</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2032" title="贡献350万流量却分文未得 视频作者状告Youtube (August 16, 2008)">贡献350万流量却分文未得 视频作者状告Youtube</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2998" title="谷歌浏览器 Chrome 发布 Linux 版本即将跟进 (November 30, 2008)">谷歌浏览器 Chrome 发布 Linux 版本即将跟进</a> (0)</li>
	<li><a href="http://www.8next.com/archives/55" title="我喜欢的几个 WordPress 插件 (June 10, 2008)">我喜欢的几个 WordPress 插件</a> (1)</li>
	<li><a href="http://www.8next.com/archives/1800" title="在2.0上用NetNewsWire订阅新闻Feeds (August 8, 2008)">在2.0上用NetNewsWire订阅新闻Feeds</a> (0)</li>
	<li><a href="http://www.8next.com/archives/10" title="向各大搜索引擎提交新网站 (June 5, 2008)">向各大搜索引擎提交新网站</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2962/feed</wfw:commentRss>
		</item>
		<item>
		<title>gd库实现php加图片水印</title>
		<link>http://www.8next.com/archives/2960</link>
		<comments>http://www.8next.com/archives/2960#comments</comments>
		<pubDate>Fri, 21 Nov 2008 05:23:33 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[gd2]]></category>

		<category><![CDATA[image png]]></category>

		<category><![CDATA[imagecreatefromjpeg]]></category>

		<category><![CDATA[图片]]></category>

		<category><![CDATA[水印]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2960</guid>
		<description><![CDATA[&#60;?php
header (&#8221;Content-Type: image/png&#8221;);
$markImage = imageCreateFromPNG(&#8217;water_218_90.png&#8217;);
$srcImage = imagecreatefromjpeg(&#8217;283_151.jpg&#8217;);
imagealphablending($srcImage, true);
//关键代码, 透明图片
$mark... ]]></description>
			<content:encoded><![CDATA[<p>&lt;?<a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a><br />
<a href="http://www.8next.com/archives/tag/header" class="st_tag internal_tag" rel="tag" title="Posts tagged with Header">header</a> (&#8221;<a href="http://www.8next.com/archives/tag/content-type" class="st_tag internal_tag" rel="tag" title="Posts tagged with Content-Type">Content-Type</a>: image/png&#8221;);</p>
<p>$markImage = imageCreateFromPNG(&#8217;water_218_90.png&#8217;);<br />
$srcImage = <a href="http://www.8next.com/archives/tag/imagecreatefromjpeg" class="st_tag internal_tag" rel="tag" title="Posts tagged with imagecreatefromjpeg">imagecreatefromjpeg</a>(&#8217;283_151.jpg&#8217;);<br />
imagealphablending($srcImage, true);<br />
//关键代码, 透明图片</p>
<p>$markW = imagesx($markImage);<br />
$markH = imagesy($markImage);</p>
<p>$srcW = imagesx($srcImage);<br />
$srcH = imagesy($srcImage);<br />
if ($srcH &gt; ($markH+10) &amp;&amp; $srcW &gt; ($markH +10 ))<br />
{<br />
imageCopy($srcImage, $markImage, $srcW-$markW-10, $srcH-$markH-10, 0, 0, $markW, $markH);<br />
imageJpeg($srcImage);   //output to browser<br />
imagedestroy($srcImage);<br />
imagedestroy($markImage);<br />
}<br />
else<br />
{<br />
imageJpeg($srcImage);   //output to browser<br />
}<br />
?&gt;</p>

	Tags: <a href="http://www.8next.com/archives/tag/gd2" title="gd2" rel="tag">gd2</a>, <a href="http://www.8next.com/archives/tag/image-png" title="image png" rel="tag">image png</a>, <a href="http://www.8next.com/archives/tag/imagecreatefromjpeg" title="imagecreatefromjpeg" rel="tag">imagecreatefromjpeg</a>, <a href="http://www.8next.com/archives/tag/php" title="PHP" rel="tag">PHP</a>, <a href="http://www.8next.com/archives/tag/%e5%9b%be%e7%89%87" title="图片" rel="tag">图片</a>, <a href="http://www.8next.com/archives/tag/%e6%b0%b4%e5%8d%b0" title="水印" rel="tag">水印</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2958" title="Php Gd2 上传图片/文字水印/图片水印/等比例缩略图/源代码 (November 21, 2008)">Php Gd2 上传图片/文字水印/图片水印/等比例缩略图/源代码</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2107" title="详细解析:关于PHP事件驱动问题 (August 19, 2008)">详细解析:关于PHP事件驱动问题</a> (0)</li>
	<li><a href="http://www.8next.com/archives/79" title="简单实用的缓存函数 (June 18, 2008)">简单实用的缓存函数</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1750" title="深入剖析require和include的用法 (August 7, 2008)">深入剖析require和include的用法</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2771" title="改变互联网的PHP程序 (September 14, 2008)">改变互联网的PHP程序</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2960/feed</wfw:commentRss>
		</item>
		<item>
		<title>Php Gd2 上传图片/文字水印/图片水印/等比例缩略图/源代码</title>
		<link>http://www.8next.com/archives/2958</link>
		<comments>http://www.8next.com/archives/2958#comments</comments>
		<pubDate>Fri, 21 Nov 2008 05:22:07 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[bmp image]]></category>

		<category><![CDATA[gd]]></category>

		<category><![CDATA[gif image]]></category>

		<category><![CDATA[image bmp]]></category>

		<category><![CDATA[image jpeg]]></category>

		<category><![CDATA[image jpg]]></category>

		<category><![CDATA[image png]]></category>

		<category><![CDATA[png image]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2958</guid>
		<description><![CDATA[

&#60;?php
/******************************************************************************
使用说明:
1. 将PHP.INI文件里面的"extension=php_gd2.dll"一行前面的;号去掉,因为我们要用到GD库;
2. 将exten..... ]]></description>
			<content:encoded><![CDATA[<div id="logPanel" class="Content-body">
<div class="UBBPanel">
<div class="UBBContent">&lt;?<a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a><br />
/******************************************************************************<br />
使用说明:<br />
1. 将<a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">PHP</a>.INI文件里面的&#8221;extension=php_gd2.dll&#8221;一行前面的;号去掉,因为我们要用到<a href="http://www.8next.com/archives/tag/gd" class="st_tag internal_tag" rel="tag" title="Posts tagged with gd">GD</a>库;<br />
2. 将extension_dir =改为你的php_gd2.dll所在目录;php4.6.0以上版本使用默认路径<br />
******************************************************************************/<br />
//上传文件类型列表<br />
$uptypes=array(<br />
&#8216;image/jpg&#8217;,<br />
&#8216;image/jpeg&#8217;,<br />
&#8216;image/png&#8217;,<br />
&#8216;image/pjpeg&#8217;,<br />
&#8216;image/gif&#8217;,<br />
&#8216;image/bmp&#8217;,<br />
&#8216;image/x-png&#8217;<br />
);<br />
$max_file_size = 200000;     //上传文件大小限制, 单位BYTE<br />
$path_im = &#8220;prod_img/&#8221;;      //生成大图保存文件夹路径<br />
$path_sim = &#8220;prod_simg/&#8221;;    //缩略图保存文件夹路径<br />
$watermark = 1;              //是否加水印(1为加水印,其他为不加水印);<br />
$watertype = 1;              //水印类型(1为文字,2为图片)<br />
$waterstring = &#8220;<a href="http://www.jy17.com/" target="_blank">http://www.jy17.com/</a>&#8220;;   //水印字符串<br />
$waterimg = &#8220;water.png&#8221;;     //水印图片文件路径<br />
$waterclearly = 100;         //水印透明度0-100，数字小透明高<br />
$imclearly = 100;            //图片清晰度0-100，数字越大越清晰，文件尺寸越大<br />
$simclearly = 75;            //缩略图清晰度0-100，数字越大越清晰，文件尺寸越大<br />
$smallmark = 1;              //是否生成缩略图(1为加生成,其他为不);<br />
$dst_sw = 80;                //定义缩略图宽度，高度我采用等比例缩放，所以只要比较宽度就可以了<br />
?&gt;<br />
&lt;form enctype=&#8221;multipart/form-data&#8221; method=&#8221;post&#8221; name=&#8221;upform&#8221;&gt;<br />
上传文件:<br />
&lt;input name=&#8221;upfile&#8221; type=&#8221;file&#8221;&gt;<br />
&lt;input type=&#8221;submit&#8221; value=&#8221;上传&#8221;&gt;&lt;br&gt;<br />
允许上传的文件类型为:&lt;?=implode(&#8217;,',$uptypes)?&gt;<br />
&lt;/form&gt;<br />
&lt;?<a href="http://www.8next.com/archives/tag/php" class="st_tag internal_tag" rel="tag" title="Posts tagged with PHP">php</a><br />
if ($_SERVER['REQUEST_METHOD'] == &#8216;POST&#8217;)<br />
{<br />
if (!is_uploaded_file($_FILES["upfile"][tmp_name]))<br />
//是否存在文件<br />
{<br />
echo &#8220;图片不存在!&#8221;;<br />
exit;<br />
}<br />
$file = $_FILES["upfile"];<br />
if($max_file_size &lt; $file["size"])<br />
//检查文件大小<br />
{   $max_file_size = $max_file_size/1000;<br />
echo &#8220;文件太大，超过 &#8220;.$max_file_size.&#8221; KB!&#8221;;<br />
exit;<br />
}<br />
if(!in_array($file["type"],$uptypes))<br />
//检查文件类型<br />
{<br />
echo &#8220;文件类型不符!&#8221;.$file["type"];<br />
exit;<br />
}<br />
if(!file_exists($path_im))<br />
//检查上传目录是否存在，不存在创建<br />
{<br />
mkdir($path_im);<br />
}</p>
<p>if(!file_exists($path_sim))<br />
//检查缩略图目录是否存在，不存在创建<br />
{<br />
mkdir($path_sim);<br />
}<br />
$filename = $file["tmp_name"];<br />
$im_size = getimagesize($filename);</p>
<p>$src_w = $im_size[0];<br />
$src_h = $im_size[1];<br />
$src_type = $im_size[2];</p>
<p>$pinfo = pathinfo($file["name"]);<br />
$filetype = $pinfo['extension'];<br />
$all_path = $path_im.time().&#8221;.&#8221;.$filetype;  //路径+文件名,目前以上传时间命名<br />
if (file_exists($all_path))<br />
{<br />
echo &#8220;同名文件已经存在了&#8221;;<br />
exit;<br />
}<br />
if(!move_uploaded_file ($filename,$all_path))<br />
{<br />
echo &#8220;移动文件出错&#8221;;<br />
exit;<br />
}<br />
$pinfo = pathinfo($all_path);<br />
$fname = $pinfo[basename];<br />
echo &#8220;&lt;font color=red&gt;已经成功上传&lt;/font&gt;&lt;br&gt;文件名:   &lt;font color=blue&gt;&#8221;.$all_path.&#8221;&lt;/font&gt;&lt;br&gt;&#8221;;<br />
echo &#8220;宽度：&#8221;.$src_w.&#8221;px &#8220;;<br />
echo &#8220;长度：&#8221;.$src_h.&#8221;px &#8220;;<br />
echo &#8220;&lt;br&gt; 大小：&#8221;.$file["size"].&#8221; bytes&#8221;;</p>
<p>switch($src_type)//判断源图片文件类型<br />
{<br />
case 1://gif<br />
$src_im = imagecreatefromgif($all_path);//从源图片文件取得图像<br />
break;<br />
case 2://jpg<br />
$src_im = <a href="http://www.8next.com/archives/tag/imagecreatefromjpeg" class="st_tag internal_tag" rel="tag" title="Posts tagged with imagecreatefromjpeg">imagecreatefromjpeg</a>($all_path);<br />
break;<br />
case 3://png<br />
$src_im = imagecreatefrompng($all_path);<br />
break;<br />
//case 6:<br />
//$src_im=imagecreatefromwbmp($all_path);<br />
//break;<br />
default:<br />
die(&#8221;不支持的文件类型&#8221;);<br />
exit;<br />
}</p>
<p>if($watermark == 1)<br />
{<br />
//$iinfo = getimagesize($all_path,$iinfo);<br />
$dst_im = imagecreatetruecolor($src_w,$src_h);<br />
//根据原图尺寸创建一个相同大小的真彩色位图<br />
$white = imagecolorallocate($dst_im,255,255,255);//白<br />
//给新图填充背景色<br />
$black = imagecolorallocate($dst_im,0,0,0);//黑<br />
$red = imagecolorallocate($dst_im,255,0,0);//红<br />
$orange = imagecolorallocate($dst_im,255,85,0);//橙<br />
imagefill($dst_im,0,0,$white);</p>
<p>imagecopymerge($dst_im,$src_im,0,0,0,0,$src_w,$src_h,100);//原图图像写入新建真彩位图中<br />
//imagefilledrectangle($dst_im,1,$src_h-15,80,$src_h,$white);<br />
switch($watertype)<br />
{<br />
case 1:    //加水印字符串<br />
imagestring($dst_im,5,5,$src_h-20,$waterstring,$orange);//文字水印，字体5号颜色橙色，位于背景图左下角<br />
break;<br />
case 2:    //加水印图片</p>
<p>$lim_size = getimagesize($waterimg);        //取得水印图像尺寸，信息</p>
<p>switch($lim_size[2]) //判断水印图片文件类型<br />
{<br />
case 1://gif<br />
$src_lim = imagecreatefromgif($waterimg);  //取得水印图像<br />
break;<br />
case 2://jpg<br />
$src_lim = <a href="http://www.8next.com/archives/tag/imagecreatefromjpeg" class="st_tag internal_tag" rel="tag" title="Posts tagged with imagecreatefromjpeg">imagecreatefromjpeg</a>($waterimg);<br />
break;<br />
case 3://png<br />
$src_lim = imagecreatefrompng($waterimg);<br />
break;<br />
//case 6:<br />
//$src_im=imagecreatefromwbmp($waterimg);<br />
//break;<br />
default:<br />
die(&#8221;不支持的文件类型&#8221;);<br />
exit;<br />
}</p>
<p>$src_lw = ($src_w-$lim_size[0])/2;  //水印位于背景图正中央width定位<br />
$src_lh = ($src_h-$lim_size[1])/2;  //height定位</p>
<p>imagecopymerge($dst_im,$src_lim,$src_lw,$src_lh,0,0,$lim_size[0],$lim_size [1],$waterclearly);//合并两个图像，设置水印透明度$waterclearly<br />
imagedestroy($src_lim);<br />
break;<br />
}<br />
switch($src_type)<br />
{<br />
case 1:<br />
imagegif($dst_im,$all_path,$imclearly);//生成gif文件，图片清晰度0-100<br />
break;<br />
case 2:<br />
imagejpeg($dst_im,$all_path,$imclearly);//生成jpg文件，图片清晰度0-100<br />
break;<br />
case 3:<br />
imagepng($dst_im,$all_path,$imclearly);//生成png文件，图片清晰度0-100<br />
break;<br />
//case 6:<br />
//imagewbmp($dst_im,$all_path);<br />
break;<br />
}<br />
//释放缓存<br />
imagedestroy($dst_im);<br />
}</p>
<p>if($smallmark == 1)<br />
{<br />
$sall_path = $path_sim.time().&#8221;.&#8221;.$filetype;</p>
<p>if (file_exists($sall_path))<br />
{<br />
echo &#8220;同名文件已经存在了&#8221;;<br />
exit;<br />
}</p>
<p>if($src_w &lt;= $dst_sw) // 原图尺寸 &lt;= 缩略图尺寸<br />
{<br />
$dst_sim = imagecreatetruecolor($src_w,$src_h); //新建缩略图真彩位图<br />
imagecopymerge($dst_sim,$src_im,0,0,0,0,$src_w,$src_h,100); //原图图像写入新建真彩位图中<br />
}</p>
<p>if($src_w &gt; $dst_sw) // 原图尺寸 &gt; 缩略图尺寸<br />
{<br />
$dst_sh = $dst_sw/$src_w*$src_h;<br />
$dst_sim = imagecreatetruecolor($dst_sw,$dst_sh); //新建缩略图真彩位图（等比例缩小原图尺寸）<br />
imagecopyresampled($dst_sim,$src_im,0,0,0,0,$dst_sw,$dst_sh,$src_w,$src_h); //原图图像写入新建真彩位图中<br />
}</p>
<p>switch($src_type)<br />
{<br />
case 1:<br />
imagegif($dst_sim,$sall_path,$simclearly);//生成gif文件，图片清晰度0-100<br />
break;<br />
case 2:<br />
imagejpeg($dst_sim,$sall_path,$simclearly);//生成jpg文件，图片清晰度0-100<br />
break;<br />
case 3:<br />
imagepng($dst_sim,$sall_path,$simclearly);//生成png文件，图片清晰度0-100<br />
break;<br />
//case 6:<br />
//imagewbmp($dst_sim,$sall_path);<br />
break;<br />
}<br />
//释放缓存<br />
imagedestroy($dst_sim);<br />
}</p>
<p>//释放缓存<br />
imagedestroy($src_im);<br />
}<br />
?&gt;</p></div>
</div>
</div>

	Tags: <a href="http://www.8next.com/archives/tag/bmp-image" title="bmp image" rel="tag">bmp image</a>, <a href="http://www.8next.com/archives/tag/gd" title="gd" rel="tag">gd</a>, <a href="http://www.8next.com/archives/tag/gif-image" title="gif image" rel="tag">gif image</a>, <a href="http://www.8next.com/archives/tag/image-bmp" title="image bmp" rel="tag">image bmp</a>, <a href="http://www.8next.com/archives/tag/image-jpeg" title="image jpeg" rel="tag">image jpeg</a>, <a href="http://www.8next.com/archives/tag/image-jpg" title="image jpg" rel="tag">image jpg</a>, <a href="http://www.8next.com/archives/tag/image-png" title="image png" rel="tag">image png</a>, <a href="http://www.8next.com/archives/tag/php" title="PHP" rel="tag">PHP</a>, <a href="http://www.8next.com/archives/tag/png-image" title="png image" rel="tag">png image</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2960" title="gd库实现php加图片水印 (November 21, 2008)">gd库实现php加图片水印</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2107" title="详细解析:关于PHP事件驱动问题 (August 19, 2008)">详细解析:关于PHP事件驱动问题</a> (0)</li>
	<li><a href="http://www.8next.com/archives/79" title="简单实用的缓存函数 (June 18, 2008)">简单实用的缓存函数</a> (0)</li>
	<li><a href="http://www.8next.com/archives/1750" title="深入剖析require和include的用法 (August 7, 2008)">深入剖析require和include的用法</a> (0)</li>
	<li><a href="http://www.8next.com/archives/2771" title="改变互联网的PHP程序 (September 14, 2008)">改变互联网的PHP程序</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2958/feed</wfw:commentRss>
		</item>
		<item>
		<title>钻石注册表修改及一些测试过的软件</title>
		<link>http://www.8next.com/archives/2955</link>
		<comments>http://www.8next.com/archives/2955#comments</comments>
		<pubDate>Sat, 01 Nov 2008 15:25:29 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[MobilePhone]]></category>

		<category><![CDATA[dword value]]></category>

		<category><![CDATA[hkey classes root]]></category>

		<category><![CDATA[hkey users]]></category>

		<category><![CDATA[htc Diamond]]></category>

		<category><![CDATA[修改]]></category>

		<category><![CDATA[注册表]]></category>

		<category><![CDATA[钻石]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2955</guid>
		<description><![CDATA[**修改機內註冊表有一定的風險, 有機會影響手機的運作, 如要修改請先進行備份.

HKEY_CLASSES_ROOT：(HKCR) 用來放置一些資料的定義，如副檔名的關聯，資料的類別之類的東西。
HKEY_LOCAL_MACHINE：(... ]]></description>
			<content:encoded><![CDATA[<p>**修改機內註冊表有一定的風險, 有機會影響手機的運作, 如要修改請先進行備份.</p>
<p>HKEY_CLASSES_ROOT：(HKCR) 用來放置一些資料的定義，如副檔名的關聯，資料的類別之類的東西。<br />
HKEY_LOCAL_MACHINE：(HKLM) 此區是放置系統的設定，不論軟體或硬體都是放在這，如同它LOCAL MACHINE的含義一樣。<br />
HKEY_CURRENT_USER：(HKCU) 用來存放使用者自己的一些資料，除非有寫程式，否則一般都是沒有在用的。<br />
HKEY_USERS： 這個區域是放置一些每個使用者共用的資料及設定，因為Windows Mobile依然架構是跟NT相近，有區分All User或User的分別，這裡就是紀錄這些東西。</p>
<p>修改註冊表要先安裝RESCO EXPLORER 內裡有一個程式叫(RESCO REGISTRY) 是可以修改機內的註冊表, 當然除在用RESCO, 還有其他的. 只不過我慣用是這個.</p>
<p>可以在程式集找到 - Resco Registry       又或者打開了 Resco Explorer , 亦都會見到My Registry</p>
<p>1.<br />
開啟被隱藏五向控制鍵　雙重功效, 利用順時針或逆時針方向旋轉觸控來SCROLL UP &amp; DOWN<br />
[HKEY_LOCAL_MACHINE/Software/<a href="http://www.8next.com/archives/tag/htc" class="st_tag internal_tag" rel="tag" title="Posts tagged with HTC">HTC</a>/SmartTouch/]<br />
新增Key ) MSContactsUI<br />
新增String Value) Name = ClassName   String = MSContactsUI<br />
新增<a href="http://www.8next.com/archives/tag/dword-value" class="st_tag internal_tag" rel="tag" title="Posts tagged with dword value">DWORD Value</a>) Name = Mode    DWORD Data= 4<br />
新增<a href="http://www.8next.com/archives/tag/dword-value" class="st_tag internal_tag" rel="tag" title="Posts tagged with dword value">DWORD Value</a>) Name = WheelCount     DWORD Data= 2<br />
2.<br />
開啟被隱藏　雙重功效,用五向控制鍵，利用順時針或逆時針方向旋轉觸控來SCROLL UP &amp; DOWN<br />
[HKEY_LOCAL_MACHINE/Software/<a href="http://www.8next.com/archives/tag/htc" class="st_tag internal_tag" rel="tag" title="Posts tagged with HTC">HTC</a>/SmartTouch/]<br />
新增Key ) RescoExplorer<br />
新增String Value) Name = ClassName   String = RESCO_EXPLORER_CLASS<br />
新增<a href="http://www.8next.com/archives/tag/dword-value" class="st_tag internal_tag" rel="tag" title="Posts tagged with dword value">DWORD Value</a>) Name = Mode    DWORD Data= 4<br />
新增<a href="http://www.8next.com/archives/tag/dword-value" class="st_tag internal_tag" rel="tag" title="Posts tagged with dword value">DWORD Value</a>) Name = WheelCount     DWORD Data= 2</p>
<p>一样可以改其他软件用五向控制鍵利用順時針或逆時針方向旋轉觸控來SCROLL UP &amp; DOWN，你要知道ClassName(一定要留意大小楷)的值, 才可以對該程式生效, 已知的如下:<br />
( 其實找classname, 可以用 g-Sensor 程式的)</p>
<p>RescoPhotoViwer = RESCO_PICVIEW_CLASS<br />
InternetExplorer = IExplore<br />
檔案總管 = FEXPLORE<br />
CorePlayer&#8217;s class = wCorePlayer<br />
聯絡人=MSContactsUI<br />
通話記錄=MSClog<br />
SMS/MMS message=Inbox.MainWnd</p>
<p>另外WheelCount的值有以下的解說:<br />
1 = Movement of one every 36 degrees<br />
5 = Movement of one every 180 degrees<br />
10 = Movement of one every 360 degrees</p>
<p>3.1 開啟被隱藏了的拍攝摸式</p>
<p>連拍:<br />
[HKEY_LOCAL_MACHINE\Software\<a href="http://www.8next.com/archives/tag/htc" class="st_tag internal_tag" rel="tag" title="Posts tagged with HTC">HTC</a>\Camera\P6]<br />
&#8220;Enable&#8221;=dword:00000001<br />
運動:<br />
[HKEY_LOCAL_MACHINE\Software\<a href="http://www.8next.com/archives/tag/htc" class="st_tag internal_tag" rel="tag" title="Posts tagged with HTC">HTC</a>\Camera\P8]<br />
&#8220;Enable&#8221;=dword:00000001<br />
影片共用:<br />
[HKEY_LOCAL_MACHINE\Software\<a href="http://www.8next.com/archives/tag/htc" class="st_tag internal_tag" rel="tag" title="Posts tagged with HTC">HTC</a>\Camera\P9]<br />
&#8220;Enable&#8221;=dword:00000001<br />
GPS 相片摸式:<br />
[HKEY_LOCAL_MACHINE\Software\<a href="http://www.8next.com/archives/tag/htc" class="st_tag internal_tag" rel="tag" title="Posts tagged with HTC">HTC</a>\Camera\P10]<br />
&#8220;Enable&#8221;=dword:00000001</p>
<p>4.<br />
4.隱藏simcard上的聯絡人資料<br />
HKCU\ControlPanel\Phone<br />
新增Dword ) Name : ShowSim<br />
DWORD Data : 0</p>
<p>5.<br />
5.不用耳筒, 直接進入音效增強器修改<br />
HKLM/System/State/Hardware/Headset<br />
DWORD Data : 1</p>
<p>6.<br />
IE的暫存檔案改在內部儲存裡面<br />
HKCU\Software\Micosoft\Windows\CurrentVersion\Explorer\Shell Folders<br />
String Value Name : Cache        String : \內部儲存\Temp\ie\Temporary Internet Files<br />
String Value Name : Cookies      String : \內部儲存\Temp\ie\Cookies<br />
String Value Name : History       String : \內部儲存\Temp\ie\History</p>
<p>7.<br />
解決來電延遲3秒(***因有c兄反應, 修改後有do do的聲音, 所以改與不改請自行決定)<br />
HKCU\ControlPanel\Sounds\Dialing<br />
Script=(修改值: apr)   /  (原本值: p)<br />
HKEY_CURRENT_USER\ControlPanel\Sounds\RingTone0<br />
Script=(修改值: av0pr)   /  (原本值: av0pw3r)</p>
<p>8.<br />
防止通話時個SCREEN關閉<br />
HKLM\Drivers\BuiltIn\RIL\BatteryTimeoutInCall<br />
DWord Data (修改值: 0)  /  (原本值: 5)<br />
HKLM\Drivers\BuiltIn\RIL\BatterySuspendTimeoutInCall<br />
DWord Data (修改值: 0)  /  (原本值: 5)<br />
HKLM\Drivers\BuiltIn\RIL\EnableFastDormantDisplayDuringCall<br />
DWord Data (修改值: 0)  /  (原本值: 0)<br />
HKCU\ControlPanel\Phone Sleep<br />
DWord Data (修改值: 0)  /  (原本值: 1)<br />
HKCU\ControlPanel\Backlight\LightSensorPollingEnable<br />
DWord Data (修改值: 0)  /  (原本值: 1)</p>

	Tags: <a href="http://www.8next.com/archives/tag/dword-value" title="dword value" rel="tag">dword value</a>, <a href="http://www.8next.com/archives/tag/hkey-classes-root" title="hkey classes root" rel="tag">hkey classes root</a>, <a href="http://www.8next.com/archives/tag/hkey-users" title="hkey users" rel="tag">hkey users</a>, <a href="http://www.8next.com/archives/tag/htc-diamond" title="htc Diamond" rel="tag">htc Diamond</a>, <a href="http://www.8next.com/archives/tag/%e4%bf%ae%e6%94%b9" title="修改" rel="tag">修改</a>, <a href="http://www.8next.com/archives/tag/%e6%b3%a8%e5%86%8c%e8%a1%a8" title="注册表" rel="tag">注册表</a>, <a href="http://www.8next.com/archives/tag/%e9%92%bb%e7%9f%b3" title="钻石" rel="tag">钻石</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.8next.com/archives/2949" title="Linux / Android on HTC Diamond (November 1, 2008)">Linux / Android on HTC Diamond</a> (1)</li>
	<li><a href="http://www.8next.com/archives/2953" title="Manila Customizer - Customize Clocks, Icons, Sliders etc (November 1, 2008)">Manila Customizer - Customize Clocks, Icons, Sliders etc</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.8next.com/archives/2955/feed</wfw:commentRss>
		</item>
		<item>
		<title>Manila Customizer - Customize Clocks, Icons, Sliders etc</title>
		<link>http://www.8next.com/archives/2953</link>
		<comments>http://www.8next.com/archives/2953#comments</comments>
		<pubDate>Sat, 01 Nov 2008 15:22:58 +0000</pubDate>
		<dc:creator>neemem</dc:creator>
		
		<category><![CDATA[MobilePhone]]></category>

		<category><![CDATA[htc Diamond]]></category>

		<category><![CDATA[internal storage]]></category>

		<category><![CDATA[kaiser]]></category>

		<category><![CDATA[Manila Customizer]]></category>

		<category><![CDATA[storage program]]></category>

		<guid isPermaLink="false">http://www.8next.com/?p=2953</guid>
		<description><![CDATA[I decided to write a Manila Customizer that will work Similar to HHC for Kaiser.
The app can be unzipped anywhere but i suggest Internal StorageProgram FilesManilaCustomizer

The Clocks are stor..... ]]></description>
			<content:encoded><![CDATA[<div id="post_message_2792999">I decided to write a <a href="http://www.8next.com/archives/tag/manila-customizer" class="st_tag internal_tag" rel="tag" title="Posts tagged with Manila Customizer">Manila Customizer</a> that will work Similar to HHC for <a href="http://www.8next.com/archives/tag/kaiser" class="st_tag internal_tag" rel="tag" title="Posts tagged with kaiser">Kaiser</a>.<br />
The app can be unzipped anywhere but i suggest \<a href="http://www.8next.com/archives/tag/internal-storage" class="st_tag internal_tag" rel="tag" title="Posts tagged with internal storage">Internal Storage</a>\Program Files\ManilaCustomizer</p>
<p>The Clocks are stored in Whatever path\ManilaCustomiser\Clocks<br />
The Icons are stored in Whatever path\ManilaCustomiser\Icons<br />
The Sliders are stores in Whatever path\ManilaCustomizer\Sliders<br />
The TopCurtains are stores in Whatever path\ManilaCustomizer\TopCurtains<br />
The BottomCurtains are stores in Whatever Path\ManilaCustomizer\BottomCurtains</p>
<p>The app will look for a .jpg file in order to be able to display and add a Clock theme and same goes for icons etc<br />
So if you want to add a clock Called FireLighter then simply Create a Folder :</p>
<p>\Whateverpath\ManilaCustomizer\Clocks\Firelighter                          &lt;-The Folder where the Manila Files are<br />
\Whateverpath\ManilaCustomizer\Clocks\Firelighter.  jpg                      &lt;- The image that will be displayed</p>
<p>Note the Jpeg and the folder has to be the exact same spelling.<br />
If the system finds a .jpg it will look for a folder by the same name and move all those files into \Windows upon selecting the Clock Set.</p>
<p>Same goes for the Icons and all others</p>
<p>There are a few special files in \ManilaCustomizer\*.txt. When an Item is applied the files for the Item (eg Clock) is stored in these files and when a new Item is applied it will first delete the files from the previous Item and then Apply the new Item (was changed to work this way in ver 0.6)</p>
<p>Please give feedback. Thanx</p>
<p>Ok i decided to split it into three parts for now. Application , Clocks, Icons.</p>
<p>So unzip Clocks into WhateverPAth\ManilaCustomizer\Clocks and same with icons</p>
<p>IVe only tested this on original installed black Manila on <a href="http://www.8next.com/archives/tag/wwe" class="st_tag internal_tag" rel="tag" title="Posts tagged with WWE">WWE</a> <a href="http://www.8next.com/archives/tag/rom" class="st_tag internal_tag" rel="tag" title="Posts tagged with Rom">Rom</a></p>
<p>Credit goes to the Following People so far who Supplied Clocks and Icons</p>
<p>NisseDILLIGAF<br />
Panosha<br />
lexxirae<br />
ProphecyXR<br />
doc31 - Sticker Icons<br />
skilty - Added a zip file with three new sets of everyting. Very nice</p>
<p>If there are some clocks here that belong to anyone please pm me and ill add your name to the credits <img src='http://www.8next.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Done :<br />
Clocks                            \ManilaCustomizer\Clocks<br />
Icons                             \ManilaCustomizer\Icons<br />
Sliders                            \ManliaCustomizer\Sliders<br />
TopCurtains                    \ManilaCustomizer\TopCurtains<br />
BottomCurtains                \ManilaCustomizer\BottomCurtains</p>
<p><span style="color: red;">Please Check Post two. Delete the whole app before reinstalling. Fixed all Clocks etc</span><br />
<span style="color: blue;">Wanna Say Special thanx to NisseDILLIGAF for his help. I dont know much about Manila files but he has helped me a lot</span></p>
<p>The ManilaCustomizer.Zip file includes 2 samples of every item cause some people dont understand the directory structure to well. Hope this helps</p></div>
<p><!-- / message --> <!-- attachments --> <fieldset class="fieldset"> <legend>Attached 