src/FlexiPeeHP/Company.php
public function saveBackupTo($filename)
    {
        $result                                   = false;
        $headersBackup                            = $this->defaultHttpHeaders;
        $this->defaultHttpHeaders['Accept']       = '*/*';
        $this->defaultHttpHeaders['Content-Type'] = 'application/x-winstrom-backup';
        $this->performRequest('backup', 'GET');
        $this->defaultHttpHeaders                 = $headersBackup;

        if ($this->lastResponseCode == 200) {
            if (file_put_contents($filename, $this->lastCurlResponse)) {
                $result = true;
            }
        }
        $this->defaultHttpHeaders = $headersBackup;
        return $result;
    }
public function saveBackupTo($filename)
    {
        $result                                   = false;
        $headersBackup                            = $this->defaultHttpHeaders;
        $this->defaultHttpHeaders['Accept']       = '*/*';
        $this->defaultHttpHeaders['Content-Type'] = 'application/x-winstrom-backup';
        $this->performRequest('backup', 'GET');
        $this->defaultHttpHeaders                 = $headersBackup;

        if ($this->lastResponseCode == 200) {
            if (file_put_contents($filename, $this->lastCurlResponse)) {
                $result = true;
            }
        }
        $this->defaultHttpHeaders = $headersBackup;
        return $result;
    }
public function saveBackupTo ( $ filename ) { $ result = false ; $ headersBackup = $ this -> defaultHttpHeaders ; $ this -> defaultHttpHeaders [ 'Accept' ] = '*/*' ; $ this -> defaultHttpHeaders [ 'Content-Type' ] = 'application/x-winstrom-backup' ; $ this -> performRequest ( 'backup' , 'GET' ) ; $ this -> defaultHttpHeaders = $ headersBackup ; if ( $ this -> lastResponseCode == 200 ) { if ( file_put_contents ( $ filename , $ this -> lastCurlResponse ) ) { $ result = true ; } } $ this -> defaultHttpHeaders = $ headersBackup ; return $ result ; }
Save company backup to file

@param string $filename

@return boolean was backup saved to file ?
Save company backup to file