Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 148... Línea 148...
148
        if ($this->recursioncounter >= self::MAX_RECURSION_TIME) {
148
        if ($this->recursioncounter >= self::MAX_RECURSION_TIME) {
149
            // Avoid endless recursion for the same URL with different parameters.
149
            // Avoid endless recursion for the same URL with different parameters.
150
            return;
150
            return;
151
        }
151
        }
152
        $this->processedfiles[] = $url;
152
        $this->processedfiles[] = $url;
153
        $curl = new curl;
153
        $curl = new curl([
-
 
154
            'proxy' => true,
-
 
155
        ]);
-
 
156
        $curl->setopt([
154
        $curl->setopt(array('CURLOPT_FOLLOWLOCATION' => true, 'CURLOPT_MAXREDIRS' => 3));
157
            'CURLOPT_FOLLOWLOCATION' => true,
-
 
158
            'CURLOPT_MAXREDIRS' => 3,
-
 
159
        ]);
155
        $msg = $curl->head($url);
160
        $msg = $curl->head($url);
156
        $info = $curl->get_info();
161
        $info = $curl->get_info();
157
        if ($info['http_code'] != 200) {
162
        if ($info['http_code'] != 200) {
158
            if ($mainfile) {
163
            if ($mainfile) {
159
                $list['error'] = $msg;
164
                $list['error'] = $msg;