Application.Contents analog in PHP

php Ireland
  • 17 years ago

    Hi,


    Is there a way to store user-defined global variables that can be accesses from any "session"? You know, like Application.Contents does  in ASP.


    Thank you.

  • 17 years ago

    can't you just use cookies or session variables?

  • 17 years ago

    Ok, here is the task (maybe there are other ways to solve this)


    I have a PHP page. When executed, it goes to a third server gets the data, processes it and displays it.
    I want to be able to control the traffic between my server and the third server.
    Whenever the PHP page loads I need it to get the data from the third server ONLY if the data older than some period.
    In order to do that I need to store the time I retrieved the data for the last time.
    This resource should be centralized, because it should be the same for all the clients and all the sessions active at the moment.


    Do you think there is a way to do that?

  • 17 years ago

    how about appending the epoch time stamp to the end of the data you transfer... making your decision, then chucking it away once you're done?

  • 17 years ago

    Well, the idea is to keep the traffic down.


    I thought of one way how to do this.
    If I store the incoming data into a file, and I check how old the data is by the file timestamp.
    Don't know how slow it's going to be, but it worth trying.


    Thanks for trying to help paulfp.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The question of whether computers can think is just like the question of whether submarines can swim.” - Edsger W. Dijkstra