From: Lawrence A. <la...@us...> - 2002-09-02 18:31:48
|
On Monday, September 2, 2002, 4:02:18 PM, Reini Urban wrote: RU> Lawrence Akka schrieb: >> Added Files: >> RPC2.php >> // Intercept GET requests from confused users. Only POST is allowed here! >> // There is some indication that $HTTP_SERVER_VARS is deprecated in php > 4.1.0 >> // in favour of $_Server, but as far as I know, it still works. >> if ($HTTP_SERVER_VARS['REQUEST_METHOD'] != "POST") >> { >> die('This is the address of the XML-RPC interface. You must use XML-RPC calls to access information here'); >> } RU> FYI: php >> 4.1.0 will support $HTTP_SERVER_VARS and friends. RU> The superglobals $_SERVER and friends are just handy references to RU> those, because they are always global. RU> Because this code is global, it is okay. RU> In a function you would have to declare it global. Thanks Reini. I do not have 4.1.0 here. I had in mind the comment in the php manual which says: $_SERVER "Variables set by the web server or otherwise directly related to the execution environment of the current script. Analogous to the old $HTTP_SERVER_VARS array (which is still available, but deprecated)." [see http://uk2.php.net/manual/en/language.variables.predefined.php#language.variables.superglobals ] |