[EMAIL PROTECTED] wrote:

[EMAIL PROTECTED] wrote:

How do you tell the url calling the script?

I want to change some of my programs to respond differently based on

domain

but function the same. For instance, if I have a script running on

www.a.com

www.b.com www.c.com and want it to differentiate by saying a certain
function would act different based on the domain.

So the value of X would be 5 for www.a.com 10 for www.b.com etc ... So
basically what I am trying to find out is how in a script can you tell

where

the script was called from? I looked at  getnetbyname by that seems to

get

the users domain not the urls domain. Anyhow following me?
No John - that's pretty cryptic.  Are we talking a CGI script running
under a webserver ?  I ask that because of the aforementioned URL.

Sorry never even thought of that. It is running under apache web server and
is a cgi script called by the web server as example
www.a.com/cgi-bin/somescript.pl
And have you tried printing out SERVER_ADDR and/or SERVER_NAME ?

They should contain the host addr/name of the server.

--
  ,-/-  __      _  _         $Bill Luebkert   ICQ=162126130
 (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to