Jeremy,
I think there might be a JavaScript solution rather than a PHP solution to
your problem.
Depending on which link, either www.english.com or www.francais.com, the
users click from www.mainurl.com  you can set a cookie with JavaScript.
Of course this cookie will 'remember' the user's initial language choice not
the language of the page they finished on, but if the users don't swapping
over and back between languages this shouldn't be a problem.
Also as JavaScript is a client-side scripting language, which can be
switched off, it is not 100% reliable but then neither are cookies!
Paul Grant

> -----Original Message-----
> From: Jeremy Gillies [SMTP:[EMAIL PROTECTED]]
> Sent: 15 February 2001 21:54
> To:   '[EMAIL PROTECTED]'
> Subject:      [PHP] PHP and cookies and/or headers
> 
> Greetings,
> 
> Is anyone REALLY familiar with PHP and cookies and/or headers-- I have a
> tough nut to crack and it involves three URLs.
> 
> Here is the situation, and I really want to avoid using our DB if I can.
> 
> I have a main URL that everyone will probably hit - splash page.
> www.mainurl.com
> 
> From there, users go into either the french or english version of the site
> with two unique URLs...
> 
> www.english.com
> www.francais.com
> 
> I want it so that if users go back to the splash page, it will pick up
> their
> language preference (french or english) and send them to the index page of
> either www.english.com or www.francais.com -- depending upon the last
> argument set when they were last at the site. So, if they ended on an
> english page, they would start at the english index page, but if the
> finished on a french page, they would start on the french index page.
> 
> The problem with cookies is the fixed URL from which they can be read.
> Obviously www.mainurl.com cannot read a cookie set by www.francais.com --
> so
> how can I over come this.
> 
> I suppose I could do it via IP stored in a DB, but even then there is a
> problem as people who hide behind one IP -- say a large business -- 
> would be stuck using each others' preferences depending upon who used the
> site last.
> 
> I also do not want the user to have to type in a code word so that the
> IP is tagged with a special identifier. I suppose I could use a random
> number generated from a time stamp... but I really want to avoid using a
> DB!
> -- mostly for speed and bloat of page size reasons.
> 
> Thanks in advance!
> Jeremy
> 
> -- 
> 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]


The information contained in this e-mail is confidential, 
may be privileged and is intended only for the use of the 
recipient named above. If you are not the intended 
recipient or a representative of the intended recipient, 
you have received this e-mail in error and must not copy, 
use or disclose the contents of this email to anybody 
else. If you have received this e-mail in error, please 
notify the sender immediately by return e-mail and 
permanently delete the copy you received. This email has 
been swept for computer viruses. However, you should 
carry out your own virus checks. 


Registered in Ireland, No. 205721. http://www.FINEOS.com 

-- 
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