I am trying to log in using a proxy with a login and password. The page is just infinitely loaded. I tried to walk with different parameters, unsuccessfully. Proxy 100% valid:

public function requestJSON( $url, $postArray = null, $options = null ) { if( is_array( $postArray ) ) // $postArray = http_build_query( $postArray ); $postArray = json_encode( $postArray, JSON_FORCE_OBJECT ); $this->curl = curl_init(); curl_setopt( $this->curl, CURLOPT_URL, $url ); curl_setopt( $this->curl, CURLOPT_COOKIEFILE, $this->curlCookieSavePath ); curl_setopt( $this->curl, CURLOPT_COOKIEJAR, $this->curlCookieSavePath ); curl_setopt( $this->curl, CURLOPT_HTTPHEADER, array ( 'Accept: application/vnd.qiwi.sso-v1+json', 'Content-Type: application/json; charset=UTF-8', 'X-Requested-With: XMLHttpRequest' ) ); curl_setopt($this->curl, CURLOPT_HEADER, 0); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($this->curl, CURLOPT_PROXYPORT, '8000'); curl_setopt($this->curl, CURLOPT_PROXYTYPE, 'HTTP'); curl_setopt($this->curl, CURLOPT_PROXY, '1.2.3.4.5'); curl_setopt($this->curl, CURLOPT_PROXYUSERPWD, 'login:psw'); if( $postArray ) { curl_setopt( $this->curl, CURLOPT_POST, 1 ); curl_setopt( $this->curl, CURLOPT_POSTFIELDS, $postArray ); } if( is_array( $options ) && count( $options ) ) { curl_setopt_array( $this->curl, $options ); } $response = curl_exec( $this->curl ); curl_close( $this->curl ); return $response; } 
  • one
    And how exactly should authentication be proxy? After all, there are different methods - CURLOPT_HTTPAUTH with CURLAUTH_BASIC, CURLAUTH_DIGEST, CURLAUTH_GSSNEGOTIATE, CURLAUTH_NTLM, CURLAUTH_ANY, y CURLAUTH_ANYSAFE. - Daniel Protopopov
  • Can you show what you mean? - user197085
  • Well, you are asked how the authorization on the proxy happens? what method? - Naumov

0