PHPStat™ 流量统计JS代码嵌入说明

如果您的站点使用脚本语言 (如HTMLL,SHTML,ASP, PHP, PERL, PYTHON, JSP..) 或者是 一种可编译的语言(如C, JAVA), 可以参照以下的实例进行脚本的嵌入.
<!-- phpstat.net --> <script language="JavaScript" type="text/javascript"> var _PCSWebSite="站点统计代码"; var _PCSImage="countlogo1.gif"; </script> <script language="JavaScript" type="text/javascript" src="http://www.***.com/count/count/count.js" ></script> <!-- /phpstat.net -->
打开一个要统计的页面可以是(HTML,SHTML,PHP,JSP,ASP等),直接把代码放置到页面HTML标签里面 或者最简单的办法就是放到任何页面的最底部,不区分是HTML,SHTML,PHP,JSP,ASP哪一种. 您还可以把代码写入到特定的文件里面 HTML,SHTML
<HTML> <HEAD> <TITLE> New Document </TITLE> <!-- phpstat.net --> <script language="JavaScript" type="text/javascript"> var _PCSWebSite="站点统计代码"; var _PCSImage="countlogo1.gif"; </script> <script language="JavaScript" type="text/javascript" src="http://www.***.com/count/count/count.js" ></script> <!-- /phpstat.net --> </HTML> 或者您可以写到JS文件里面 <? document.write("JS代码"); ...... ...... ...... document.write("<script language=\"javascript\" type=\"text/javascript\">"); document.write("var _PCSWebSite=\"站点统计代码\";"); document.write("var _PCSImage=\"countlogo1.gif\";"); document.write("</script>"); document.write("<script language=\"javascript\" type=\"text/javascript\" src=\"http://www.***.com/count/count.js\" ></script>"); ?>
PHP
<? print("PHP代码"); ?> <!-- phpstat.net --> <script language="JavaScript" type="text/javascript"> var _PCSWebSite="站点统计代码"; var _PCSImage="countlogo1.gif"; </script> <script language="JavaScript" type="text/javascript" src="http://www.***.com/count/count/count.js" ></script> <!-- /phpstat.net --> 或者您可以写到PHP文件里面 <? print("PHP代码"); ...... ...... ...... print("<!-- phpstat.net -->"); print("<script language=\"JavaScript\" type=\"text/javascript\">"); print("var _PCSWebSite=\"站点统计代码\";"); print("var _PCSImage=\"countlogo1.gif\";"); print("</script>"); print("<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.***.com/count/count/count.js\" ></script>"); print("<!-- /phpstat.net -->"); ?>
JSP
<%@ page contentType = "text/html; charset=euc-kr" %> <% out.println("JSP代码"); %> <!-- phpstat.net --> <script language="JavaScript" type="text/javascript"> var _PCSWebSite="站点统计代码"; var _PCSImage="countlogo1.gif"; </script> <script language="JavaScript" type="text/javascript" src="http://www.***.com/count/count/count.js" ></script> <!-- /phpstat.net --> 或者您可以写到JSP文件里面 <% out.println("JSP代码"); ...... ...... ...... out.println("<!-- phpstat.net -->"); out.println("<script language=\"JavaScript\" type=\"text/javascript\">"); out.println("var _PCSWebSite=\"站点统计代码\";"); out.println("var _PCSImage=\"countlogo1.gif\";"); out.println("</script>"); out.println("<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.***.com/count/count/count.js\" ></script>"); out.println("<!-- /phpstat.net -->"); %>
Python
#!/usr/bin/env python print "Content-type: text/html\n\n" print("<!-- phpstat.net -->"); print("<script language=\"JavaScript\" type=\"text/javascript\">"); print("var _PCSWebSite=\"站点统计代码\";"); print("var _PCSImage=\"countlogo1.gif\";"); print("</script>"); print("<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.***.com/count/count/count.js\" ></script>"); print("<!-- /phpstat.net -->");
PERL
#!/usr/bin/perl print "Content-type: text/html\n\n" print("<!-- phpstat.net -->"); print("<script language=\"JavaScript\" type=\"text/javascript\">"); print("var _PCSWebSite=\"站点统计代码\";"); print("var _PCSImage=\"countlogo1.gif\";"); print("</script>"); print("<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.***.com/count/count/count.js\" ></script>"); print("<!-- /phpstat.net -->");
C
#include <stdio.h> int main() { printf("content-type: text/html\n\n"); printf("<!-- phpstat.net -->"); printf("<script language=\"JavaScript\" type=\"text/javascript\">"); printf("var _PCSWebSite=\"站点统计代码\";"); printf("var _PCSImage=\"countlogo1.gif\";"); printf("</script>"); printf("<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.***.com/count/count/count.js\" ></script>"); printf("<!-- /phpstat.net -->"); return(0); }
特别说明 http://www.phpstat.net QQ:158839753 Email:wiwiboy@126.com Tel:15990206416/13553166317

Powered by: PHPStat Copyright © 2007 PHPStat All Rights Reserved.