[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.
If so, you could check out the EBV vrbls SERVER_ADDR and/or SERVER_NAME
which should tell you want you need to know.
--
,-/- __ _ _ $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