protected function webLogin()
    {
        $response = $this->webclient->get("/en/auth", array(
            'cookies' => $this->cookiejar,
        ));

        $csrf = $this->getBetween((string)$response->getBody(), "document.write('", "');");
        $csrf = str_replace("' + '", "", $csrf);
        $name = $this->getBetween($csrf, 'name="', '"');
        $value = $this->getBetween($csrf, 'value="', '"');

        $response = $this->webclient->post("/en/auth", array(
            'body' => array(
                'submit' => 'Login',
                'email' => $this->username,
                'password' => $this->password,
                $name => $value,
            ),
        ));

        if($response->getStatusCode() == 200){
            throw new YouHostingException($this->getBetween((string) $response->getBody(), '<div class="notification info">', '</div>'));
        }
    }
protected function webLogin()
    {
        $response = $this->webclient->get("/en/auth", array(
            'cookies' => $this->cookiejar,
        ));

        $csrf = $this->getBetween((string)$response->getBody(), "document.write('", "');");
        $csrf = str_replace("' + '", "", $csrf);
        $name = $this->getBetween($csrf, 'name="', '"');
        $value = $this->getBetween($csrf, 'value="', '"');

        $response = $this->webclient->post("/en/auth", array(
            'body' => array(
                'submit' => 'Login',
                'email' => $this->username,
                'password' => $this->password,
                $name => $value,
            ),
        ));

        if($response->getStatusCode() == 200){
            throw new YouHostingException($this->getBetween((string) $response->getBody(), '<div class="notification info">', '</div>'));
        }
    }
protected function webLogin ( ) { $ response = $ this -> webclient -> get ( "/en/auth" , array ( 'cookies' => $ this -> cookiejar , ) ) ; $ csrf = $ this -> getBetween ( ( string ) $ response -> getBody ( ) , "document.write('" , "');" ) ; $ csrf = str_replace ( "' + '" , "" , $ csrf ) ; $ name = $ this -> getBetween ( $ csrf , 'name="' , '"' ) ; $ value = $ this -> getBetween ( $ csrf , 'value="' , '"' ) ; $ response = $ this -> webclient -> post ( "/en/auth" , array ( 'body' => array ( 'submit' => 'Login' , 'email' => $ this -> username , 'password' => $ this -> password , $ name => $ value , ) , ) ) ; if ( $ response -> getStatusCode ( ) == 200 ) { throw new YouHostingException ( $ this -> getBetween ( ( string ) $ response -> getBody ( ) , '<div class="notification info">' , '</div>' ) ) ; } }
Login to YouHosting's website

@throws YouHostingException
Login to YouHosting s website