|
-
Apr 28th, 2003, 08:13 PM
#1
Thread Starter
Lively Member
Is there a such "Server Session"?
For who know ASP, all I want is an "application" variable, the equivalent to session, but it saves the "cookie" on the server, not on the client.
For who don't know ASP, I will explain what is that application variable: It's very simple. It's a variable that saves on the server for whatever session of any file is open to the client.
That means, it stores the variable outside of the file cache, but it is not on the client, it is on the server, so it applies not only for one client session, but for all of them.
It is usefull, for example, to put a hit counter on the page (which is not my case).
Example:
count.asp (can be included in any file)
VB Code:
<%
Application("count") = Application("count") + 1
%>
showcount.asp
VB Code:
<HTML>
Total hits: <%= Application("count") %>
</HTML>
If anyone, from anyplace, ask for count.asp, it will increment the counter. The "total hits" showed, will be always equal or higher, for anyone who visit the showcount.asp, it doesn't matter if that person have cookies or not.
It must have an working example, with codes, on www.asp101.com for who is interested. I want just exactly same thing on PHP. 
Thanks for reading and, please, help if you can. 
edit:
It just came to me this though. It is pretty much same thing than using a database, or a file, in protected mode, like "UPDATE with (rowlock)" on SQL. Which means, only one session per time use the variable, but all of them uses it. The main difference is that I wouldn't need to keep a file together with the PHP, nor sets up a database. Well, because of that, maybe this resource doesn't even exist on PHP... 
But I still don't know how to do this on TXT file, anyway. So, any help is still welcome.
Last edited by Cawas; Apr 28th, 2003 at 08:21 PM.
--
Cauê Cavalheiro Machado Rego
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|