עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

שמירת הIP המחוברים במערך בAPPLICATION.

Featured Replies

פורסם

אני מניח שאתה רוצה לשמור את הip של כל גולש באתר...

אם כן, אז זו הדרך ההיגיונית לעשות את זה.

מה שכן, אתה צריך לשים את הקוד בApplication_Start

רק לפני שאתה מכניס ערכים למסד, תבדוק אם הip הזה קיים כל במסד, ורק אם לא אז תכניס ערך חדש.

פורסם
  • מחבר

לפי מה שהבנתי צריך להכניס את זה למערך בAPPLICATION, אבל כל העבודה נעשית בSESSION(חיבור וניתוק של אנשים).

בסופו של דבר, למסד הכנסתי ע"י עוגיה שאני שומר אצל המשתמש(אני רוצה לשמור רק לאלה שמחוברים).

תודה.

פורסם
  • מחבר

הקפצה:(שאלה חדשה)

ניסיתי לבצע את זה:


<% userip = Application("userip")
if Application("usercount") = 0 then
%> אין אנשים
<% end if
for i=1 to Application("usercount")
response.write(userip(i))
<% next
%>


SUB Application_OnStart
Dim uip()
Application("userip") = uip
Application("usercount") = 0
END SUB

SUB Session_OnStart
redim uip(ubound(uip)+1) preserve
uip(ubound(uip)) = Request.ServerVariables("REMOTE_ADDR")
Application.lock
Application("userip") = uip
Application("usercount") = ubound(uip)
Application.unlock
END SUB

SUB Session_OnEnd
dim tmp()
dim i, j, flag
redim tmp(ubound(uip)-1)
j=1
flag = false
for i=lbound(uip) to ubound(uip) step 1
if uip(i) <> Request.ServerVariables("REMOTE_ADDR") or flag then
tmp(j) = uip(i)
j=j+1
else
flase = true
end if
next i
uip = tmp
Application.lock
Application("userip") = uip
Application("usercount") = ubound(uip)
Application.unlock
END SUB

ולא הצלחתי(הוא טוען שאין אנשים באתר - המונה שווה ל- 0).

האם מישהו יכול לתקן אותי?

לפי http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/WINDOWS2000/en/server/iis/htm/asp/vbob8zw4.htm

תודה רבה.

עריכה: יש אפשרות לאתחל את הAPPLICATION שלי?

ועוד שאלה אחת: איך אני בודק אם יש לי שגיאות בGLOBAL ASA שלי? הוא צריך להציג לי שגיאת 500, או שהוא לא אומר כלום?

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.