Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can you test against a user's location/domain?

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
I'm supposed to be writing a page that, if a user is from an approved domain they go one place, and if they are not from an approved domain, they go another. How do I check what domain a user is coming from?
 
you can do so in coldfusion, you can do so in any client side language (javascript, vbscript) [all these using the referrer property] but all those are UNSAFE (maybe easy but definitly dangerous)
set it in your web server rather. As it depends on which web server you're using, i'd suggest you post your question in the appropriate forum, where you're more likely to get an answer.
 
ColdFusion has a set of cgi functions you can use to get info about client or server; to get the client IP (domain), you'll use CGI.REMOTE_ADDR;

example:

<cfoutput>
#CGI.REMOTE_ADDR#
</cfoutput>

this will return the IP address of the client system requesting the template Sylvano
dsylvano@hotmail.com

&quot;every and each day when I learn something new is a small victory...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top