Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Get client IP address
Old 05-14-2009, 01:19 AM Get client IP address
Junior Talker

Posts: 2
Name: Kamaranka
Trades: 0
Do you know how to get client's IP address ?
IF NOT this is the way.

PHP Code:
<?Php

$Ip
=$_SERVER['REMOTE_ADDR'];

?>
goji juice | ventrilo server
cjr_Sobe is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-20-2009, 09:51 PM Re: Get client IP address
Novice Talker

Posts: 9
Trades: 0
Hi,

http://roshanbh.com.np/2007/12/getti...ss-in-php.html

That may help you further.
__________________

Please login or register to view this content. Registration is FREE

Free Pay Per Click for Webmasters
sc_king is offline
Reply With Quote
View Public Profile
 
Old 05-21-2009, 08:58 AM Re: Get client IP address
Junior Talker

Posts: 3
Name: SIMBU
Trades: 0
I want to fetch client's ip address as soon as he accesses my web-site built in asp.net.Then i want to store it in my database.
Is there any method to achieve this target in asp.net application.
If you could help me i will be very thankful to you.

================================================== ===
famous vegan
permanente make up
abinaya is offline
Reply With Quote
View Public Profile
 
Old 05-23-2009, 02:08 PM Re: Get client IP address
fwnow's Avatar
Average Talker

Posts: 22
Name: PHP Only
Location: San Diego, CA
Trades: 0
Excellent. It is very helpful for individual script or forums. I usually track IPs from my hosting CPanel in order to find any bot trying to steal information. In my forums, I use it for blocking spamsers, but the problem is that many spammers are suing fake IPs.
__________________

Please login or register to view this content. Registration is FREE
fwnow is offline
Reply With Quote
View Public Profile
 
Old 05-23-2009, 05:44 PM Re: Get client IP address
Average Talker

Posts: 17
Name: Jeremy
Location: WV
Trades: 0
You may want to use this first:
Quote:
getenv("HTTP_X_FORWARDED_FOR");
AdscendJeremy is offline
Reply With Quote
View Public Profile Visit AdscendJeremy's homepage!
 
Old 05-24-2009, 10:51 AM Re: Get client IP address
frih's Avatar
Super Talker

Posts: 139
Name: abhi
Location: http://www.techbusy.org/
Trades: 0
well, will it show correct IP of the user if he is using proxy?
__________________

Please login or register to view this content. Registration is FREE
|

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
frih is offline
Reply With Quote
View Public Profile Visit frih's homepage!
 
Old 05-25-2009, 10:20 PM Re: Get client IP address
Average Talker

Posts: 17
Name: Jeremy
Location: WV
Trades: 0
If it's a non-anonymous proxy it will. Some proxies provide the forward_for and others don't.

I believe if you use $_SERVER['REMOTE_ADDR']; and it has a forward for, you'll get something like this returned:
123.456.789.123, 987,654.321.098
AdscendJeremy is offline
Reply With Quote
View Public Profile Visit AdscendJeremy's homepage!
 
Old 05-26-2009, 08:52 AM Re: Get client IP address
Junior Talker

Posts: 3
Name: Vorapoap L.
Trades: 0
Quote:
Originally Posted by AdscendJeremy View Post
If it's a non-anonymous proxy it will. Some proxies provide the forward_for and others don't.

I believe if you use $_SERVER['REMOTE_ADDR']; and it has a forward for, you'll get something like this returned:
123.456.789.123, 987,654.321.098

I don't think so.. are you sure??.. I think you need to get X-HTTP-FOWARD..... for that NAT address

According to my experience, REMOTE_ADDR always returns 1 single IP address...
vorapoap is offline
Reply With Quote
View Public Profile
 
Old 05-26-2009, 11:15 PM Re: Get client IP address
Average Talker

Posts: 17
Name: Jeremy
Location: WV
Trades: 0
Google "comma get ip php" and check results #1 and #3
Also check the Wikipedia for X-HTTP-FORWARD
__________________
Adscend Media,
Please login or register to view this content. Registration is FREE

Monetize your content with our content gateway!
Please login or register to view this content. Registration is FREE

Last edited by AdscendJeremy; 05-30-2009 at 06:50 PM..
AdscendJeremy is offline
Reply With Quote
View Public Profile Visit AdscendJeremy's homepage!
 
Reply     « Reply to Get client IP address
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28933 seconds with 12 queries