Six factors to help you create a great website

I’m wondering how to create a great site to put me in bucks.
I would like to share some ideas with you in the hope it would be helpful.  [originally post on zausiu’s blog http://ykyi.net]

1. Content is the most important thing. If your website is a long-term business, don’t even think about black-hat SEO. Appropriate legal SEO is necessary, but it can’t be too over-killing. High quality content is worthier of your time and effort.Search engine’s algorithm is quickly changing. If your website is friendly to the visitor, it’s friendly to SE too.

2. Visitors can benifit from your site. That’s why they will come back. Useless website cannot survive in the internet world.

3. In the huge wave of SNS age, take advantage of the SNS is a must. As you know, something sprend in social network like infectious virus.

4. If you have enough time and technology support. Consider develop related desttop version application and app for mobile phone. Those apps must be able to update automatically, and you can control them in the server side. So, you can push all kinds of infomation to the apps, which will guide the users to visit your website, so your site traffic increases. What is more, the apps will be released to various kinds of download sites. Most likely your website URL will be post there which are your high-quality external links. You surely know how much the high-quality external links means to your site.

5. You’d better have a team, even though you are versatile and are able to play a number of roles. Remember it’s not a age for lone heroes any more, everybody is limited in some aspects.

[originally post on zausiu’s blog http://ykyi.net]

6. Your site have a central theme. The content are basically about this core. Don’t make your website like a hodgepodge. Visitors don’t like this, so is search engine. It is preferable that you personally have much interests in this theme and You are a expert on this field.

fsockopen真好用,PHP的高级别网络函数!

今天用Burp工具分析了一个网站的大致功能后打算写程序把该网站我感兴趣的内容全抓下来。
一开始用java写了一小段,但哥对Java不熟悉哇,而且哥觉得Java的那么多流的类,如果仅仅操作文本文件,就显得封装的太厚了。又想,用C/C++写。虽然用C/C++写的最多代码,但事实上C/C++的字符串操作一想起来就嫌烦,而且正则式也烂得可以,数组不支持用字符串索引也真够麻烦,虽然可用C++的std::map容器。最后决定用PHP写…PHP真是太好用了~~~犹赞超强大的正则式,同perl的正则式有得一拼啊。如果换用标准C字符串函数和GNU的一个超难用的C正则式库,那要写死人啊~~~

最开始的思维定势就是要先开一个socket(N多参数要填入), 省略bind(操作系统自已选一个本地端口绑定),第二步 connect 到主机,第三步往 socket 里写东西… 虽然只几个简单函数,但要填的几个参数也真够难记的。嘿,偶像发现事实上PHP提供了high-level的socket函数 fsockopen()。哇,太方便了。

fsockopen()
returns a file pointer which may be used together with the other file functions (such as fgets(), fgetss(), fwrite(), fclose(), and feof())
fsocketopen返回一个文件指针,然后就可以用常用的文件函数操作它啦!!!和操作文本一件一样~~~ 比 Java 的 java.io.socket 类还要方便~~虽然java也抽象的不错,但我就是嫌流对象封装太厚了。人生苦短,何必自找麻烦呢。
用完以后用 fclose 把它fsockopen返回的文件指针关掉!

看个例程:
fp = fsockopen(“udp://127.0.0.1”, 13,errno, $errstr);
if (!$fp) {
echo “ERROR: errno –errstr
\n”;
} else {
fwrite($fp, “\n”);
echo fread($fp, 26);
fclose($fp);
}
?>
上面的例程从本机的UDP时间服务器里读取当时的时间和日期。如果你本机开了标准的时间服务的话~~~

copyright ykyi.net