[PHP] set variables based on HTTP_HOST

2005-08-08 Thread Joe Szilagyi
Is this potentially bad, security wise, to do something like this? Can you guys recommend any way to tighten this up a bit or do this sort of thing better/more eloquently? ? $Host1 = array ('name1.host.com'); if (in_array ($_SERVER['HTTP_HOST'], $Host1)) { $HeaderImg =

Re: [PHP] set variables based on HTTP_HOST

2005-08-08 Thread Richard Davey
Hello Joe, Monday, August 8, 2005, 6:40:37 PM, you wrote: JS Is this potentially bad, security wise, to do something like this? JS Can you guys recommend any way to tighten this up a bit or do this JS sort of thing better/more eloquently? $_SERVER is, thankfully, _mostly_ populated by the web

Re: [PHP] set variables based on HTTP_HOST

2005-08-08 Thread Joe Szilagyi
Hi! On 8/8/05, Richard Davey [EMAIL PROTECTED] wrote: Why are you creating lots of arrays and then using in_array to check them? Just seems a little pointless in this instance as it gives you no real benefit - comparing a one element array against a variable is just... well.. comparing a

Re[2]: [PHP] set variables based on HTTP_HOST

2005-08-08 Thread Richard Davey
Hello Joe, Tuesday, August 9, 2005, 12:57:17 AM, you wrote: JS // call the include header file for that host JS if (file_exists($includepath/$Header)) {// include valid? JS include stripslashes($includepath/$Header); // yup, include JS } else { JS echo FAILURE

Re: [PHP] set variables based on HTTP_HOST

2005-08-08 Thread Chris
Richard Davey wrote: Hello Joe, Tuesday, August 9, 2005, 12:57:17 AM, you wrote: JS // call the include header file for that host JS if (file_exists($includepath/$Header)) {// include valid? JS include stripslashes($includepath/$Header); // yup, include JS } else { JS