Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Development / Plugin which adds a random value to the database on each page load

foxhound
#40701 2015-03-15 22:57

I am trying to identify a user/guest and know if he is on my website while he connects to a different server. So, for that I am using a session  in some custom php I wrote over the last few weeks.
However, this PHP script I made runs outside of Cotonti, I query the DB for a few values but thats it.
Since my script is actually working and doing what it is supposed to be doing I want to change it now so it gets embedded properly within my website and for that I need to make it a plugin.

Can someone explain to me how to make a plugin which will load with ever page request a user makes on my website please? Cause I really have no idea how to make it and where to start to make it work with every page request.
I was looking through the common.php and sure I can edit it and add it there, but I rather have this as a plugin so the core stays clean of my stuff :)

 

Oh, I know there are already sessions created but those are of no use for me as they are the same for the entire session. I need to create unique session values with each page request so i can cross check a users presence.

 

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />