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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need the IP of referrer

Status
Not open for further replies.

r0nke

MIS
Jul 17, 2003
60
0
0
US
Hi Folks

I need to allow only visitors from a certain range of IPs to visit a website.

Is there a way I can capture the referrer's IP?

Not the IP of my website but the IP of the referrer.

I dont want to do it by URL but by IP.

Thanks

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

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
TruthInSatire

thanks for your quick response.


<cfoutput>#CGI.REMOTE_ADDR#</cfoutput> retrieves the IP of my site, not the referrer's IP.

I was hoping for the referrer's IP


 
no sir


REMOTE_ADDR
IP address of the remote host making the request


The REMOTE_ADDR is the IP address of the client requesting the template.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
I skipped the last line of your original post.

you'll have to ping it by website name using cfexecute probably and get the IP that way. there is no easy way to get it by IP.

The remote_addr is the IP of the visitor, skipping the last line of your post i thought you were using referr and requester interchangably.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
here is a thread that can tell you how to ping. it'll have to be modified a bit to use the website NAME, but you should be able to get the gist.
thread232-1090810


We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
You are right, it returns the Client's IP.

So I guess, I am looking for the IP value of http_referrer.

Thank you TruthInSatire
 
sorry for the confusion :(

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top