mohammad303
New Member
من این کدبر روی golabal.asaxنوشتم ام اشکالاتی میگیرد چه چوری میتونم ان را بر روی صفحات به کاربران نشان دهم کسی هست که این کد کامل کند در vb که امار بازدید و دیگر خصوصیات را در صفحات نشان داده شود
<%@ Application Language="VB" %>
<script runat="server">
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application shutdown
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a new session is started
ClientName = Request.UserHostName 'نام دستگاه'
ClientIP = Request.UserHostAddress
REFERER = Request.ServerVariables.Item("HTTP_REFERER") 'نام سایت"
If Now.Date = Session("today_Date") Then 'افراد انلاین'
Session("today") += 1
Session("today_Data") = Now
Else
'Add value to DataBase
End If
LANGUAGE = Request.ServerVariables.Item("HTTP_ACCEPT_LANGUAGE") 'مشخصات سیستم'
AGENT = Request.ServerVariables.Item("HTTP_USER_AGENT")
platform = Request.Browser.Platform()
QUERY STRING = Request.ServerVariables.Item("QUERY_STRING")'صفحه حاضر'
Browser = Request.Browser.Browser()
Browser_Type = Request.Browser.Type()
Browser_Version = Request.Browser.Version()
Dim MyDateTime As New DateTime 'زمان و تاریخ بازدید'
MyDateTime = Now()
Dim MyDate As String = MyDateTime.ToString("MM/dd/yyyy")
Dim MyTime As String = MyDateTime.ToString("hh:mm:ss")
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a session ends.
' Note: The Session_End event is raised only when the sessionstate mode
' is set to InProc in the Web.config file. If session mode is set to StateServer
' or SQLServer, the event is not raised.
End Sub
</script>
کسی هسسسسسسسسسسسسسسست
<%@ Application Language="VB" %>
<script runat="server">
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application shutdown
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a new session is started
ClientName = Request.UserHostName 'نام دستگاه'
ClientIP = Request.UserHostAddress
REFERER = Request.ServerVariables.Item("HTTP_REFERER") 'نام سایت"
If Now.Date = Session("today_Date") Then 'افراد انلاین'
Session("today") += 1
Session("today_Data") = Now
Else
'Add value to DataBase
End If
LANGUAGE = Request.ServerVariables.Item("HTTP_ACCEPT_LANGUAGE") 'مشخصات سیستم'
AGENT = Request.ServerVariables.Item("HTTP_USER_AGENT")
platform = Request.Browser.Platform()
QUERY STRING = Request.ServerVariables.Item("QUERY_STRING")'صفحه حاضر'
Browser = Request.Browser.Browser()
Browser_Type = Request.Browser.Type()
Browser_Version = Request.Browser.Version()
Dim MyDateTime As New DateTime 'زمان و تاریخ بازدید'
MyDateTime = Now()
Dim MyDate As String = MyDateTime.ToString("MM/dd/yyyy")
Dim MyTime As String = MyDateTime.ToString("hh:mm:ss")
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a session ends.
' Note: The Session_End event is raised only when the sessionstate mode
' is set to InProc in the Web.config file. If session mode is set to StateServer
' or SQLServer, the event is not raised.
End Sub
</script>
کسی هسسسسسسسسسسسسسسست