{"id":62,"date":"2006-05-09T20:00:47","date_gmt":"2006-05-09T12:00:47","guid":{"rendered":"http:\/\/twycf.com\/wordpress\/archives\/62"},"modified":"2006-05-09T20:01:22","modified_gmt":"2006-05-09T12:01:22","slug":"%e8%a8%aa%e5%ae%a2%e8%a8%88%e6%95%b8%e5%99%a8","status":"publish","type":"post","link":"https:\/\/twycf.com\/?p=62","title":{"rendered":"\u8a2a\u5ba2\u8a08\u6578\u5668"},"content":{"rendered":"<p>\u5728<a href=\"http:\/\/blog.cookys.org\/\">\u9905\u4e7e\u5927\u4e8b\u7d00<\/a> \u90a3\u5152\u770b\u5230\u4e86\u4e00\u500b\u7d14\u6587\u5b57\u7684\u8a2a\u5ba2\u8a08\u6578\u5668 <a href=\"http:\/\/andersdrengen.dk\/projects\/counterize\/\">Counterize<\/a>\uff0c\u53ef\u4ee5\u986f\u793a\u7684\u53c3\u6578\u76f8\u7576\u591a\uff0c\u60a8\u53ef\u4ee5\u53c3\u8003\u672c\u7ad9\u4e0b\u65b9<!--more--><br \/>\n<coolcode linenum=\"off\"><br \/>\nTotal Hits:37 | Total Hits Today:2 | IP Visited:29 | Unique referers:17<br \/>\nTotal Hit:\u672c\u7ad9\u9ede\u64ca\u6578<br \/>\nTotal Hits Today:\u4eca\u65e5\u9ede\u64ca\u6578<br \/>\nIP Visited:IP \u8a2a\u554f\u6578<br \/>\nUnique referers:\u88ab\u9023\u7d50\u6578<\/coolcode><br \/>\n\u800c\u9019\u4e00\u500b Plug-in \u7684\u5b89\u88dd\u65b9\u5f0f\u53ef\u4ee5\u53c3\u8003 <a href=\"http:\/\/andersdrengen.dk\/projects\/counterize\/\">Counterize Installation<\/a>\uff0c\u6216\u662f\u53c3\u8003\u672c\u7ad9\u7684\u5b89\u88dd\u8aaa\u660e\uff1a<br \/>\n1.\u5148\u53d6\u5f97 <a href=\"http:\/\/andersdrengen.dk\/projects\/counterize\/counterize.phps\">Counterize \u539f\u59cb\u7a0b\u5f0f<\/a>(\u53e6\u5b58\u65b0\u6a94\u5f8c\uff0c\u5b58\u70ba counterize.php)\uff0c\u4e26\u653e\u81f3 wp-content\/plugins\/Counterize<br \/>\n2.\u53d6\u5f97\u4ee5\u4e0b\u56db\u500b\u5716\u6a94\uff0c\u4e26\u5b58\u81f3 wp-content\/plugins\/Counterize \u76ee\u9304\u4e0b<br \/>\n<a href=\"http:\/\/andersdrengen.dk\/projects\/counterize\/counterize_red.png\">image1<\/a> | <a href=\"http:\/\/andersdrengen.dk\/projects\/counterize\/counterize_yellow.png\">image2<\/a> | <a href=\"http:\/\/andersdrengen.dk\/projects\/counterize\/counterize_blue.png\">image3<\/a> | <a href=\"http:\/\/andersdrengen.dk\/projects\/counterize\/counterize_green.png\">image4<\/a><br \/>\n3.\u5728\u7ba1\u7406\u9801\u9762\u555f\u7528\u9019\u500b Plugin<br \/>\n4.\u555f\u7528\u5f8c\u53ef\u80fd\u6703\u9047\u5230\u932f\u8aa4\u8a0a\u606f\uff0c\u90a3\u662f\u56e0\u70ba\u8a18\u9304 Countrize \u8cc7\u6599\u8868\u6c92\u6709\u88ab\u6b63\u78ba\u5efa\u7acb\uff0c\u9019\u6642\u5019\u9700\u8981\u9032\u5165\u8cc7\u6599\u5eab\u624b\u52d5\u5efa\u7acb Countrize \u8cc7\u6599\u8868<br \/>\n<coolcode linenum=\"off\" lang=\"sql\">create table %sCounterize<br \/>\n(<br \/>\n  id integer not null auto_increment,<br \/>\n  IP varchar(16) not null default &#8216;unknown&#8217;,<br \/>\n  timestamp datetime not null default &#8216;now()&#8217;,<br \/>\n  url varchar(255) not null default &#8216;unknown&#8217;,<br \/>\n  referer varchar(255) not null default &#8216;unknown&#8217;,<br \/>\n  useragent text,<br \/>\n  primary key(id)<br \/>\n)<\/coolcode><br \/>\n\u5c07 %s \u53d6\u4ee3\u70ba\u4f60\u7684 WordPress \u524d\u7f6e\u5b57\u4e32\uff0c\u4f8b\u5982 wp_Counterize<br \/>\n\u5982\u679c\u5728\u5efa\u7acb\u8cc7\u6599\u8868\u7684\u6642\u5019\uff0c\u9047\u5230\u932f\u8aa4\u8a0a\u606f<br \/>\n<coolcode linenum=\"off\">#1067 &#8211; Invalid default value for &#8216;timestamp&#8217; <\/coolcode><br \/>\n\u539f\u56e0\u662f\u4f60\u7684\u8cc7\u6599\u5eab\u7121\u6cd5\u5728 datetime \u6b04\u4f4d\u4e2d\u63a5\u53d7 now() \u7684\u9810\u8a2d\u503c\uff0c\u8acb\u6539\u7528\u4ee5\u4e0b\u7684 SQL Command<br \/>\n<coolcode linenum=\"off\" lang=\"sql\"><br \/>\nCREATE TABLE `wp_Counterize` (<br \/>\n  `id` int(11) NOT NULL auto_increment,<br \/>\n  `IP` varchar(16) NOT NULL default &#8216;unknown&#8217;,<br \/>\n  `timestamp` datetime NOT NULL,<br \/>\n  `url` varchar(255) NOT NULL default &#8216;unknown&#8217;,<br \/>\n  `referer` varchar(255) NOT NULL default &#8216;unknown&#8217;,<br \/>\n  `useragent` text,<br \/>\n  PRIMARY KEY  (`id`)<br \/>\n)<\/coolcode><br \/>\n5.\u63a5\u4e0b\u4f86\uff0c\u5c31\u662f\u6c7a\u5b9a\u8981\u628a\u8a08\u6578\u5668\u986f\u793a\u5230\u756b\u9762\u7684\u90a3\u4e00\u500b\u5730\u65b9\u4e86\uff0c\u5728\u9019\u88e1\uff0c\u4f60\u9700\u8981\u6c7a\u5b9a\u8981\u986f\u793a\u7684\u53c3\u6578\uff0c\u7136\u5f8c\u628a\u9019\u500b\u53c3\u6578\u5beb\u5230\u6a21\u7248(\u5916\u89c0 -> \u4f48\u666f\u4e3b\u984c\u7de8\u8f2f\u5668)\u4e2d\uff0c\u4f8b\u5982\u672c\u7ad9\u7684\u53c3\u6578<br \/>\n<coolcode linenum=\"off\" lang=\"php\"><?php \necho \n\"Total Hits:<font color='0x000000'>&#8220;.counterize_getamount() .<br \/>\n&#8220;<\/font> | Total Hits Today:<font color='0x000000'>&#8220;.counterize_gethitstoday() .<br \/>\n&#8220;<\/font> | IP Visited:<font color='0x000000'>&#8220;.counterize_getuniqueamount() .<br \/>\n&#8220;<\/font> | Unique referers:<font color='0x000000'>&#8221; . counterize_getuniquereferers().&#8221;<\/font>&#8220;;<br \/>\n?><\/coolcode><\/p>\n<p>6.Countrize \u8a08\u6578\u5668\u53c3\u6578\u5217\u8868<br \/>\n<coolcode linenum=\"off\">echo counterize_getuniqueurl()<br \/>\n&#8212; Returns amount of unique URl&#8217;s that have been shown<\/p>\n<p>echo counterize_getamount()<br \/>\n&#8212; Returns total hits seen by Counterize.<\/p>\n<p>echo counterize_gethitstoday()<br \/>\n&#8212; Returns total hits registered today.<\/p>\n<p>echo counterize_getuniquebrowsers()<br \/>\n&#8212; Returns amount of unique browser-strings that have visited.<\/p>\n<p>echo counterize_getuniquereferers()<br \/>\n&#8212; Returns amount of unique referers that&#8217;s registered.<\/p>\n<p>echo counterize_getlatest7days()<br \/>\n&#8212; Returns total amount of hits from the last 7 days.<\/p>\n<p>echo counterize_getuniqueamount()<br \/>\n&#8212; Returns total unique IP&#8217;s that&#8217;s been seen.<\/p>\n<p>echo counterize_getfromcurrentip()<br \/>\n&#8212; Returns total hits from the IP that&#8217;s visiting.<\/p>\n<p>echo counterize_getuniquehitstoday()<br \/>\n&#8212; Returns the number of different IP&#8217;s registered today.<\/p>\n<p>echo counterize_gethitstodayfromcurrentip()<br \/>\n&#8212; Returns daily hits from the IP that&#8217;s visiting.<\/p>\n<p>echo counterize_return_first_hit()<br \/>\n&#8212; Returns the date of the first registrated entry in the database.<\/p>\n<p>counterize_most_visited_pages()<br \/>\n&#8212; Create graph of most visited pages.<\/p>\n<p>counterize_most_visited_ips()<br \/>\n&#8212; Create graph of most active IPs.<\/p>\n<p>counterize_most_used_browsers()<br \/>\n&#8212; Create graph of most seen useragents.<\/coolcode><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u9905\u4e7e\u5927\u4e8b\u7d00 \u90a3\u5152\u770b\u5230\u4e86\u4e00\u500b\u7d14\u6587\u5b57\u7684\u8a2a\u5ba2\u8a08\u6578\u5668 Counterize\uff0c\u53ef\u4ee5\u986f\u793a\u7684\u53c3\u6578\u76f8\u7576\u591a\uff0c\u60a8\u53ef\u4ee5\u53c3\u8003\u672c\u7ad9\u4e0b\u65b9<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/twycf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=62"}],"version-history":[{"count":0,"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions"}],"wp:attachment":[{"href":"https:\/\/twycf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/twycf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/twycf.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}