I am trying to create a log entry where i want to check if the user is visiting first time or 2nd or 3rd time or multiple times
In this case i am considering the time to be split into 8,16,26 so if the same user is coming back and forth in first 8 hours, it should only make one entry in db and if the user is again coming back in the next 8 hours it should make another entry and once the entry is made within the 8 hour slot, he can come and go multiple times but only 1 entry will be made
so in that case i am trying to use the code starting here
var sessionRotated = dateConvert('local2Utc', now()).hour();
<cfif sessionRotated LTE 8> <!--- first entry --->
<cfset entry_1 = true>
</cfif>
<cfif sessionRotated LTE 16 AND sessionRotated gte 8> <!--- first entry --->
<cfset entry_2 = true>
</cfif>
<cfif sessionRotated LTE 16 and sessionRotated GTE 24> <!--- first entry --->
<cfset entry_3 = true>
</cfif>
but i am missing a logic here how can i use it along with the IPAddress
any idea
A couple of things here.
Other points: Cookies can be cleared. This isn't foolproof. IP Addresses can change. VPN's, new connection at a different Starbucks, different computer, etc. If you have a login system, that's a much better way to track a specific user. Anytime you're looking at just the HOUR, you aren't considering first hit at 11am, next hit at 2pm.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.