[Toolserver-l] How to determine if script runs in the toolserver cluster?

Pietrodn powerpdn at gmail.com
Thu Sep 3 08:04:49 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il giorno 02/set/09, alle ore 14:39, Tim Landscheidt ha scritto:

> Hi,
>
> is there any reliable way to determine if a script is run in
> the toolserver cluster, i. e. can make use of the database
> servers & Co., without checking for hostname being wolfs-
> bane, nightshade or names-to-come?

In PHP:

$DEBUG=(preg_match("/\btoolserver\.org$/", $_SERVER['SERVER_NAME']) ?  
false : true);
if($DEBUG)
         // Not on TS.
else
         // ON TS

"I'm Outlaw Pete,
I'm Outlaw Pete,
Can you hear me?"
Pietrodn
powerpdn at gmail.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkqfeKIACgkQ36hWg9C8ELFreQCfX6RYlnhCFFk2d2gGFQgDp7Kf
GTwAnRQumK96AtLp5CD8LWiben4+O1Yv
=1Hqs
-----END PGP SIGNATURE-----



More information about the Toolserver-l mailing list