Michael wrote:
> It's simple enough to pull a 1px GIF of something from a different URL to the 
> page being accessed, and this will use the same cookie everytime.
>
> However I need a PHP cookie ID variable that is available to PHP scripting 
> across different sites; and I am trying to get my head around how this can be 
> achieved.
>   
You can pass the session id over URLs if you have links between the 
websites:

On website-a:

http://www.website-b.com/?s=<?php echo session_id() ?>

Then on website-b:

<?php
session_id($_GET['s']);
session_start();
var_dump($_SESSION); //get all session data from website-a
?>

Alternatively, if your domains are like 'subdomain-a.website.com' and 
'subdomain-b.website.com':

<?php
session_name('website');
session_set_cookie_params(3600,'/','.website.com');
session_start();
?>

Now the session cookie is stored for .website.com and you can access 
across subdomains.

Hope this helps!

Cheers,
Stig

-- 
Stig Manning
http://www.sdm.co.nz


--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to