this is something I never needed todo, but it works.

<?php
    // www.miningsurplus.com/counter.php

    session_id('0a99a548c57c06306e408cf44b2d5d10');
    session_start();

    if (!isset($HTTP_SESSION_VARS['counter']))
    {
        $counter = 0;
        session_register('counter');
    }
    $counter++;

    echo $counter;
?>

<?php
    // www.mediawaveonline.com/counter.php

    session_id('0a99a548c57c06306e408cf44b2d5d10');
    session_start();

    if (!isset($HTTP_SESSION_VARS['counter']))
    {
        $counter = 0;
        session_register('counter');
    }
    $counter++;

    echo $counter;
?>

these two files are on the same server, just under different domains. because I am 
using the same session_id() they share the same value.

-- 

 Chris Lee
 [EMAIL PROTECTED]



""Sigitas Paulavicius"" <[EMAIL PROTECTED]> wrote in message 
9drd9l$jpp$[EMAIL PROTECTED]">news:9drd9l$jpp$[EMAIL PROTECTED]...
Is it possible to declare some kind of "super" global variable in PHP, which
would be avaliable to all later PHP scripts/processes?

I suppose I could use a database or filesystem. But in this case of mine I
need to store and retrieve some values very fast and consuming as little
resourses as possible. These values would actually be used to determine if a
connection to database is required.

Any advice or comment would be really helpfull.

Sigitas



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to