Dear Stephen thanks for that, but the IP address of the server is going to be one of two: I know the address of the server the untranslated site lives on (my own server, 195.149.39.122), and the translated site is coming from (216.239.39.104). The reason I'm not comparing the whole IP string is that for some reason REMOTE_ADDR gives 216,239,39,104 - I guess I could do a CONTAINS on that string, but I don't anticipate this feature will be well-used, so it's not worth spending too much time on/fiddling about with.
But thanks for the tip, and I'll store away ListGetAt for another day, or if my code starts behaving unexpectedly (wouldn't be the first time ;-) Ian W ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 18, 2003 10:11 AM Subject: Re: [ cf-dev ] yesterday's HTTP_HOST/SCRIPT_NAME etc problem... Ian, >just in case anyone else was interested, the answer was cgi.REMOTE_ADDR, as in > ><cfif cgi.REMOTE_ADDR CONTAINS '216'> ><cfset session.translate = 'yes'> ></cfif> > >and then I test for the existence of that session var and output stuff or not accordingly. I don't need to lock this 'cause it's setting a hard value as the session var, and the same for each user. > I can't remember exactly what the problem was and I can't find it cos I'm using a NTMail web mail from home which doesn't seem to like SunJRE1.4.2 too much.... But.... If I remember correctly 216 was the first octet(?) of the IP address. If this is true and that's what you need to check for, your above code will find 216 at any position in the IP address. You would be better with <cfif ListGetAt(cgi.remote_addr,1,".") EQ 216> This picks up the ip address and handles it as a dot seperated list, grabs the first element from that list and checks to see if it is 216. Obviously, if you get a request from any client with ip address that starts with 216 your still going to get a confusion over whether the page is being translated or not. Only way to stop that is compare the full ip address in remote_addr with the expected ipaddress for the translation server. Hope I'm not repeating anything thats already been said... Sorry if I am. Regards Stephen ---------------------------------------------------------------------------- ---- > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
