GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP proxy redirect script? (https://gfy.com/showthread.php?t=1019409)

Klen 04-21-2011 06:34 AM

PHP proxy redirect script?
 
Anyone have script which you can use to mass include to several sites with purpose to redirect proxy traffic somewhere else.

AdultKing 04-21-2011 08:45 AM

Use iptables redirect.

u-Bob 04-21-2011 08:49 AM

Quote:

Originally Posted by AdultKing (Post 18075672)
Use iptables redirect.

then he'll have to know the IPs of the proxies....

AdultKing 04-21-2011 08:51 AM

http://www.maxmind.com/app/geoip_country

fris 04-21-2011 10:24 AM

Quote:

Originally Posted by KlenTelaris (Post 18075379)
Anyone have script which you can use to mass include to several sites with purpose to redirect proxy traffic somewhere else.

you can check for the proxy header.

GrouchyAdmin 04-21-2011 10:26 AM

Quote:

Originally Posted by fris (Post 18075976)
you can check for the proxy header.

...and you can run a wordpress platform, but that doesn't mean it's gonna work out, either.

(See what I did there? Custom response, just for you, buddy.)

Klen 04-21-2011 10:36 AM

I got perl script with solution,but i need php version.
PHP Code:

 if (

             
$ENV{HTTP_X_FORWARDED_FOR} ||

       
$ENV{HTTP_VIA} ||

   
$ENV{HTTP_CACHE_CONTROL} ||

          
$ENV{HTTP_PROXY_CONNECTION}

   ) {

    print 
"<script>document.location = 'http://';</script >";

 
#proxy traff

 
} else {
      print 
"<script>document.location = 'http://';</script >"


fris 04-21-2011 10:37 AM

Quote:

Originally Posted by GrouchyAdmin (Post 18075978)
...and you can run a wordpress platform, but that doesn't mean it's gonna work out, either.

(See what I did there? Custom response, just for you, buddy.)

so much hate for everything.

why dont you give us some input on what you would do since you are so advanced in the developing field.

if all you do is give negative feedback, why bother.

Klen 04-21-2011 11:15 AM

Found another here:
http://www.phpbuddy.com/article.php?id=22
but not sure does it work since it's kind a tricky to test it.

fris 04-21-2011 11:17 AM

Quote:

Originally Posted by KlenTelaris (Post 18076170)
Found another here:
http://www.phpbuddy.com/article.php?id=22
but not sure does it work since it's kind a tricky to test it.

Code:

<?php

$test = new proxyCheck();
$test->serverVar = $_SERVER;
$header = $test->checkHeader();

class proxyCheck {
         
          var $serverVar = array();
         
          private $proxyHeader = array();
         
                function checkHeader() {
                       
                          if(isset($this->serverVar['HTTP_X_FORWARDED_FOR'])) {
                                          $this->proxyHeader['HTTP_X_FORWARDED_FOR'] = $this->serverVar['HTTP_X_FORWARDED_FOR'];
                          }
                         
                    if(isset($this->serverVar['HTTP_X_FORWARDED'])) {
                                    $this->proxyHeader['HTTP_X_FORWARDED'] = $this->serverVar['HTTP_X_FORWARDED'];
                          }
                         
                          if(isset($this->serverVar['HTTP_FORWARDED'])) {
                                    $this->proxyHeader['HTTP_FORWARDED'] = $this->serverVar['HTTP_FORWARDED'];
                          }
                         
                          if(isset($this->serverVar['HTTP_PROXY_AGENT'])) {
                                    $this->proxyHeader['HTTP_PROXY_AGENT'] = $this->serverVar['HTTP_PROXY_AGENT'];
                          }
                         
                          if(isset($this->serverVar['HTTP_VIA'])) {
                                    $this->proxyHeader['HTTP_VIA'] = $this->serverVar['HTTP_VIA'];
                          }
                         
                          if(isset($this->serverVar['HTTP_PROXY_CONNECTION'])) {
                                    $this->proxyHeader['HTTP_PROXY_CONNECTION'] = $this->serverVar['HTTP_PROXY_CONNECTION'];
                          }
                         
                          if(isset($this->serverVar['HTTP_CLIENT_IP'])) {
                                    $this->proxyHeader['HTTP_CLIENT_IP'] = $this->serverVar['HTTP_CLIENT_IP'];
                          }
                         
                          return $this->proxyHeader;
                }
               
               
}

?>

not sure if this is what you are after.

Klen 04-21-2011 11:36 AM

Quote:

Originally Posted by fris (Post 18076184)
Code:

<?php

$test = new proxyCheck();
$test->serverVar = $_SERVER;
$header = $test->checkHeader();

class proxyCheck {
         
          var $serverVar = array();
         
          private $proxyHeader = array();
         
                function checkHeader() {
                       
                          if(isset($this->serverVar['HTTP_X_FORWARDED_FOR'])) {
                                          $this->proxyHeader['HTTP_X_FORWARDED_FOR'] = $this->serverVar['HTTP_X_FORWARDED_FOR'];
                          }
                         
                    if(isset($this->serverVar['HTTP_X_FORWARDED'])) {
                                    $this->proxyHeader['HTTP_X_FORWARDED'] = $this->serverVar['HTTP_X_FORWARDED'];
                          }
                         
                          if(isset($this->serverVar['HTTP_FORWARDED'])) {
                                    $this->proxyHeader['HTTP_FORWARDED'] = $this->serverVar['HTTP_FORWARDED'];
                          }
                         
                          if(isset($this->serverVar['HTTP_PROXY_AGENT'])) {
                                    $this->proxyHeader['HTTP_PROXY_AGENT'] = $this->serverVar['HTTP_PROXY_AGENT'];
                          }
                         
                          if(isset($this->serverVar['HTTP_VIA'])) {
                                    $this->proxyHeader['HTTP_VIA'] = $this->serverVar['HTTP_VIA'];
                          }
                         
                          if(isset($this->serverVar['HTTP_PROXY_CONNECTION'])) {
                                    $this->proxyHeader['HTTP_PROXY_CONNECTION'] = $this->serverVar['HTTP_PROXY_CONNECTION'];
                          }
                         
                          if(isset($this->serverVar['HTTP_CLIENT_IP'])) {
                                    $this->proxyHeader['HTTP_CLIENT_IP'] = $this->serverVar['HTTP_CLIENT_IP'];
                          }
                         
                          return $this->proxyHeader;
                }
               
               
}

?>

not sure if this is what you are after.

Welll there are several types of proxys,what is considered proxy here it's non-anonymous alias transparent proxy where you can see both real and proxy ip.I find it weird why this kind of proxy ip's still exits since all web proxy sites are anonymous proxies,plus even if someone using classing proxies it's very easy to find anonymous proxies.I guess only bot things uses this kind of proxy therefore it need to be banned from traffic pool.

Klen 04-22-2011 05:48 AM

So basically script need to detect and redirect such traffic to desired url.Most of trade scripts can do it,but it's faster to add code into site wide include.


All times are GMT -7. The time now is 09:09 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123