请更换tsing’s Blog的订阅地址

我的blog最早是放在http://tsing.vonye.com上,那是桑甚先生免费提供的空间。

不过因为我在宿舍访问太慢,后来干脆自己买了个域名,然后用了一个国内的空间一直到现在。

我从bloglines看到有很多人订阅了当时在http://tsing.vonye.com的RSS和Atom地址。现在那里的订阅都是转向这个服务器的RSS和Atom。

不过好像tsing.vonye.com快不能用了,以前的三个订阅地址如下:

http://tsing.vonye.com/feed/rss/

http://tsing.vonye.com/feed/atom/

http://tsing.vonye.com/feed/rss2/

估计上面这三个地址没过多久就不能用了,所以如果你以前是订阅的tsing.vonye.com上的RSS或Atom的话,麻烦你更改为新的地址吧。

新的地址是:

RSS 1.0http://blog.jianqing.net/rss.php

Atom 0.3http://blog.jianqing.net/atom.php

我将保持这两个地址的长期有效性。^_^

本来想用feedburner的服务的,不过RSS和Atom在那儿都乱码了,一时找不到原因,只好暂时先放弃。

updated 2005-4-20:

今天发现feedburner不乱码了,不知什么原因。之前曾经将atom文件中的xml:lang=”zh“改为xml:lang=”zh-CN”,不知是因为这个原因才好的,或者就只是feedburner自己灵异了,呵呵

总之,增加一个订阅地址:FeedBurner

欺骗Google 提升网页的PageRank值?

Dark Seo Team上看到的,Bilan du projet pagerank 10 / About pagerank 10 project是对其Pagerank 10的介绍,里面详述了怎样通过欺骗Google来欺骗提升网页的PageRank值。(看不懂法文,猜的)

主要意思应该是说通过对你的网站进行重定向,将网页重定向到一个PR值较高页面,Google会认为你的网站是那个PR值高的页面的所有者,因此你的网站的PR值就和那个页面的PR值一样。

提到的重定向方法有以下四条:

  • Redirection 301 : Moved Permanently
  • Redirection 302 : Moved Temporarily
  • Meta-Refresh à 0 secondes
  • Iframes, frames et javascript

然后该文还给了一段示例如何获得PR10的代码:

<?php

// Dark Seo Team Powered Cloakin’ Stuff // -> MakeYouWorkALittle (-;

if (GooglebotStealMyPage&Content)

{

// Code only for Google

header(“Status: 301 Moved Permanently”);

header(“Location: http://www.google.com”);

exit();

}

else {

echo “I Steal His PR””; // visual page for all

// copy here all cool stuff u want

}

?>

代码的意思就是说如果是Google的机器人在搜索布网页,就将页面重定向到http://www.google.com,这样你的页面的PR值就将和http://www.google.com一样。

因此我猜想如果将以下代码加入网页的头部,是否就可以达到欺骗Google,提升PageRank的值呢?

  1. if(strstr($_SERVER[‘HTTP_USER_AGENT’], “Googlebot”))
  2. {
  3. header(“Status: 301 Moved Permanently”);
  4. header(“Location: http://www.google.com”);
  5. exit();
  6. }

还有就是文章链接的一篇相关文章Spammers hijack web site listings in Google上也有关于这种hijack的相关信息。对被hijack的站点是很有危害的,可能会导致该站点不被google收录等问题。因为google会认为那站点只是你的站点的一个镜像之一。

不过我没有试过这个方法到底可不可行,谁有兴趣可以尝试一下。

2005-03-08 updated: 已经有人实验成功了,详见花儿开了
2005-05-05 updated: 今天又看到了一个:UGiA.CN,呵呵。

MySQL 语句中 INSERT 语句的另一种写法

MySQL 中的 INSERT 语句还可以这样写:

INSERT INTO tbl_name (col1, col2) VALUES (value1_1, value1_2),(value2_1, value2_2),(value3_1, value3_2)…

相当于: INSERT INTO tbl_name (col1, col2) VALUES (value1_1, value1_2) INSERT INTO tbl_name (col1, col2) VALUES (value2_1, value2_2) INSERT INTO tbl_name (col1, col2) VALUES (value3_1, value3_2)

如果在执行过程中碰到一个值错误,则这个值以后的数据都不会被插入。

PHP Cookbook

今天找到的一本非常好的书:

PHP Cookbook The PHP Cookbook is a collection of problems, solutions, and practical examples for PHP programmers. The book contains a unique and extensive collection of best practices for everyday PHP programming dilemmas. It contains over 250 recipes, ranging from simple tasks to entire programs that demonstrate complex tasks, such as printing HTML tables and generating bar charts — a treasure trove of useful code for PHP programmers, from novices to advanced practitioners. Who This Book Is For This book is for programmers who need to solve problems with PHP. If you don’t know any PHP, make this your second PHP book. The first should be Programming PHP, also from O’Reilly & Associates. If you’re already familiar with PHP, this book will help you overcome a specific problem and get on with your life (or at least your programming activities.) The PHP Cookbook can also show you how to accomplish a particular task in PHP, like sending email or writing a SOAP server, that you may already know how to do in another language. Programmers converting applications from other languages to PHP will find this book a trusty companion. What Is in This Book We don’t expect that you’ll sit down and read this book from cover to cover. (although we’ll be happy if you do!). PHP programmers are constantly faced with a wide variety of challenges on a wide range of subjects. Turn to the PHP Cookbook when you encounter a problem you need to solve. Each recipe is a self-contained explanation that gives you a head start towards finishing your task. When a recipe refers to topics outside its scope, it contains pointers to related recipes and other online and offline resources. If you choose to read an entire chapter at once, that’s okay. The recipes generally flow from easy to hard, with example programs that “put it all together” at the end of many chapters.The hapter introduction provides an overview of the material covered in the chapter,including relevant background material, and points out a few highlighted recipes of special interest.

Continue reading PHP Cookbook

CSS相关收集

几个不错的CSS陈列馆网站:

其中最富盛名的当属css Zen Garden,个人则比较喜欢The Weekly standards

另外放几个比较有用的网站:

How To write Efficient CSSpositioniseverything上的一篇文章,实用。

用Smarty写的picviewer

下午试着用Smarty重写picviewer,还比较顺利。

使用Smarty前要建templates, templates_c, configs ,cache四个目录才能使用

Smarty模板的建立要比PHPLIB复杂一点,但功能较强,输出控制也简单得多,速度差别还没多大感觉。

顺便还发现了picviewer(PHPLIB)的一个bug,就是最后嵌套完后剩余不足一层的图片不会显示出来,只要在循环之外将外层block再parse一次就可以了。