$_SERVER['SERVER_NAME'] writable !
From: Vincent M. (cult_at_free.fr)
Date: 04/29/04
- Next message: Geert-Jan van Leeuwen: ""<a href" in combination with php"
- Previous message: Rick [Kitty5]: "Re: Prevent image linking / bandwidth theft?"
- Next in thread: Jedi121: "Re: $_SERVER['SERVER_NAME'] writable !"
- Reply: Jedi121: "Re: $_SERVER['SERVER_NAME'] writable !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Apr 2004 14:12:46 +0200
Hello,
I am using the variable $_SERVER['SERVER_NAME'] inside a function, for
example:
function check_servname() {
global $server ;
if($_SERVER['SERVER_NAME'] != $server) {
echo "NOT OK, NOT GOOD SERVER NAME" ;
exit ;
}
}
But we can modify the value of $_SERVER['SERVER_NAME'] before calling
the function check_servname(). And I am looking for a the right server
name not for a server name which may have been changed before calling
check_servername:
$_SERVER['SERVER_NAME'] = "www.google.com" ; //before calling
check_servname and $_SERVER['SERVER_NAME'] will be "www.google.com"
inside the function even the server name is not "www.google.com".
Is there any way to get the server name with a variable which would be
read-only ?
Thanks,
Vincent.
- Next message: Geert-Jan van Leeuwen: ""<a href" in combination with php"
- Previous message: Rick [Kitty5]: "Re: Prevent image linking / bandwidth theft?"
- Next in thread: Jedi121: "Re: $_SERVER['SERVER_NAME'] writable !"
- Reply: Jedi121: "Re: $_SERVER['SERVER_NAME'] writable !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]