title: php proxy no longer working
body: <p>I have a custom php proxy class =></p>
  
  <pre><code>class Proxy
  {
      private $proxy,
              $header,
              $timeout,
              $agent;
  
      public function __construct($proxy, $header = null, $timeout = null, $agent = null) {
          $this-&gt;proxy   = $proxy;
          $this-&gt;header  = empty($header)  ? 1 : $header;
          $this-&gt;timeout = empty($timeout) ? 5 : $timeout;
          $this-&gt;agent   = empty($agent)   ? "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8" : $agent;
      }
  
      public function set_proxy($proxy) {
          $this-&gt;proxy = $proxy;
      }
  
      public function get_page($url, $referer = "http://www.google.com/") {
          $ch = curl_init();
          curl_setopt($ch, CURLOPT_URL, $url);
          curl_setopt($ch, CURLOPT_HEADER, $this-&gt;header);
  
          curl_setopt($ch, CURLOPT_PROXY, $this-&gt;proxy);
          curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true);
          curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this-&gt;timeout);
          curl_setopt($ch, CURLOPT_REFERER, $referer);
          curl_setopt($ch, CURLOPT_USERAGENT, $this-&gt;agent);
          curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  
          $result = array();
          $result['exe'] = curl_exec($ch);
          $result['inf'] = curl_getinfo($ch);
          $result['err'] = curl_error($ch);
  
          curl_close($ch);
  
          return $result;
      }
  }
  </code></pre>
  
  <p>Which I init like so =></p>
  
  <pre><code>    $proxy = new Proxy("PROXY_IP:PROXY_PORT");
      $content = $proxy-&gt;get_page($url);
  </code></pre>
  
  <p>And everything was working fine up until a couple of days ago. Now I keep getting error messages mostly related to <code>Received HTTP code 403 from proxy after CONNECT</code>.
  Since I have no clue how an unmodified code could just stop working - I have no idea how to even debug this issue.</p>
  
  <p>Any help would be appreciated.
  Thanks!</p>
  
  <p>EDIT:
  I know what 403 status code means, I'm just saying I get the 403 no matter what proxy I use and no matter which page I try to get using it.</p>