by 清泉
17. 六月 2010 21:39
This is a PHP class that calculates the time between specified points. It can be used to determine how long your page took to generate or how long certain loops take to run. This class is very flexible because it allows you to specify any number of “marker” points in the code and then compare any of them together. There is nothing fancy about it. I ran across a post from someone looking for something like this and claimed it was hard to find… so I figured I’d release what we have in an effort to help anyone else out there.
[更多...]
by 清泉
7. 六月 2010 09:26
首先,IP对应的国家是比较好查的,ICANN及其它几个机构都有关于某个IP段所属国家和ISP信息,并且他们基本上都提供了免费查询。但难题在于每个洲的管理机构不同,且数据量庞大,不易收集。将IP对应到某个国家的某个ISP后还要了结到它是分配给哪个地区(城市)的,比如中国电信福建分公司的IP段会分给厦门、福州等城市,而相对于这个就是比较难找了,可能ISP会有数据库会提供查询,可能也查不到,这些数据的来源就靠平时的积累、用户的贡献了。
[更多...]