Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 03:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Find the IP behind Proxy

Discussion on Find the IP behind Proxy within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
Angellinho's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
Find the IP behind Proxy

It`s working only on Apache Servers (not Litespeed) that have installed HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR .

PHP Code:
function ip() {
  
$address $_SERVER['REMOTE_ADDR'] ;
  if ( ! empty( 
$_SERVER['HTTP_X_REAL_IP'] ) ) {
   
$ip[] = 'X-Real-IP: ' $_SERVER['HTTP_X_REAL_IP'] ;
  }
  if ( ! empty( 
$_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
   
$ip[] = 'X-Forwarded-For: ' $_SERVER['HTTP_X_FORWARDED_FOR'] ;
  }

  if ( ! empty( 
$ip ) ) $address .= '(' implode','$ip ) . ')' ;

  return 
$address ;
 } 
Second way:

PHP Code:
function ip() {
  if ( isset( 
$_SERVER['HTTP_X_FORWARDED_FOR'] ) && filter_var$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP,
   
FILTER_FLAG_NO_PRIV_RANGE ) ) {
   
$_SERVER['REMOTE_ADDR'] = filter_var$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IPFILTER_FLAG_NO_PRIV_RANGE ) ;
  } else
   if ( isset( 
$_SERVER['HTTP_X_REAL_IP'] ) && filter_var$_SERVER['HTTP_X_REAL_IP'], FILTER_VALIDATE_IP,
    
FILTER_FLAG_NO_PRIV_RANGE ) ) {
    
$_SERVER['REMOTE_ADDR'] = filter_var$_SERVER['HTTP_X_REAL_IP'], FILTER_VALIDATE_IPFILTER_FLAG_NO_PRIV_RANGE ) ;
   } else {
    if ( isset( 
$_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
     
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'] ;
    }
    if ( isset( 
$_SERVER['HTTP_X_REAL_IP'] ) ) {
     
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'] ;
    }
   }
   return 
$_SERVER['REMOTE_ADDR'] ;
 } 
You can **** yourself if you will ask where to put these codes. Means you`re not deserved to have internet access then.
Angellinho is offline  
Old 04/14/2012, 18:06   #2


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,974
Where to put these codes?
Whoknowsit is offline  
Thanks
1 User
Old 04/14/2012, 18:44   #3
 
elite*gold: 0
Join Date: Jan 2012
Posts: 32
Received Thanks: 5
HTTP_X_FORWARDED_FOR is correct
MostTronics© - Korb is offline  
Old 04/14/2012, 20:15   #4
 
Angellinho's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
Thanks and, Whoknowsit,



Really?!
Angellinho is offline  
Old 04/14/2012, 21:27   #5


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,974
Just kidding Nice post.
Whoknowsit is offline  
Old 04/14/2012, 23:41   #6
 
Angellinho's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
Thank you.
Angellinho is offline  
Old 04/15/2012, 02:09   #7
 
Mashkin's Avatar
 
elite*gold: 44
Join Date: May 2010
Posts: 2,053
Received Thanks: 1,747
Quote:
Originally Posted by Whoknowsit View Post
Just kidding Nice post.
You almost got 1000 posts...

I would prefer the second way...
However, it should be clear how to access the X-Forwarded-For or X-Real-IP headers once you know they exist.

Same thing with the filter_var() function, though.
Mashkin is offline  
Reply


Similar Threads Similar Threads
*Tutorial* How To Get A Free Proxy Or Find & Test A Proxy
03/17/2017 - SRO Hacks, Bots, Cheats & Exploits - 17 Replies
Tired of the IP limit and you want to make a ARMY on SRO!? In this tutorial i will give you WEBSITES where to get proxies & also test proxies, so that you dont have to keep testing it on your bot and waste TIME! Websites OF FREE PROXIES! Free Proxy List - Public Proxy Servers (IP PORT) - Hide My Ass! Socks5 Open Proxy List sorted by reliability column, descending
[HOW TO] Easily Find and get Working Proxy Servers
12/22/2010 - Tutorials - 4 Replies
Firts of all this is not a Hacking Utility, Its a way to surf safe in the web. ;) If you are sick of testing proxyes from a list of websites that does'nt work here is a solution. This works better that any other software. What we'll need: - Proxy Finder Enterprise (v1.95 precraked) - The Grabber (Proxy Check Utility)
Hepl to Find Proxy...
04/03/2008 - Off Topic - 9 Replies
Ppl plz help me to find proxy (HTTPS,Socks 4,5) Need it as soon as possible...Need it for game...
autoloot proxy where do i find it?
01/17/2008 - Conquer Online 2 - 8 Replies
autoloot proxy where do i find it? so loot everything in market meteors, Elite items, money, good stuff,dbs,super items i have try google only find virus and shit i have try elitepvpers dont find anything so u ppl so have a link post it here so i can download it



All times are GMT +1. The time now is 03:24.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.