src/Vatsimphp/Sync/AbstractSync.php
protected function loadFromUrl($url)
    {
        $url = $this->overrideUrl($url);
        $this->log->debug("Load from url $url");
        $this->initCurl();
        curl_setopt($this->curl, CURLOPT_URL, $url);
        if (!$data = $this->getDataFromCurl()) {
            return false;
        }

        // fix encoding
        $data = iconv('ISO-8859-15', 'UTF-8', $data);

        // validate data through parser
        if (!$this->isDataValid($data)) {
            $this->addError($url, 'Data not valid according to parser');

            return false;
        }

        // save result to disk
        $this->saveToCache($data);

        return true;
    }
protected function loadFromUrl($url)
    {
        $url = $this->overrideUrl($url);
        $this->log->debug("Load from url $url");
        $this->initCurl();
        curl_setopt($this->curl, CURLOPT_URL, $url);
        if (!$data = $this->getDataFromCurl()) {
            return false;
        }

        // fix encoding
        $data = iconv('ISO-8859-15', 'UTF-8', $data);

        // validate data through parser
        if (!$this->isDataValid($data)) {
            $this->addError($url, 'Data not valid according to parser');

            return false;
        }

        // save result to disk
        $this->saveToCache($data);

        return true;
    }
protected function loadFromUrl ( $ url ) { $ url = $ this -> overrideUrl ( $ url ) ; $ this -> log -> debug ( "Load from url $url" ) ; $ this -> initCurl ( ) ; curl_setopt ( $ this -> curl , CURLOPT_URL , $ url ) ; if ( ! $ data = $ this -> getDataFromCurl ( ) ) { return false ; } // fix encoding $ data = iconv ( 'ISO-8859-15' , 'UTF-8' , $ data ) ; // validate data through parser if ( ! $ this -> isDataValid ( $ data ) ) { $ this -> addError ( $ url , 'Data not valid according to parser' ) ; return false ; } // save result to disk $ this -> saveToCache ( $ data ) ; return true ; }
Load data from url and pass it to the parser
If successful save raw data to cache.

@param string $url

@return bool
Load data from url and pass it to the parser If successful save raw data to cache .