Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/12/2015, 14:56
fbadiola
 
Fecha de Ingreso: octubre-2015
Ubicación: España
Mensajes: 21
Antigüedad: 8 años, 7 meses
Puntos: 6
Respuesta: Eliminar la verificación de curl para https

Buenas,
Si sólo quieres descargar el fichero entero por qué no usas ¿file_get_contents?
Código PHP:
<?php
    $url 
"https://contrataciondelestado.es/wps/wcm/connect/4f63ed19-6c7f-4b91-8f7b-0d7ee34bc7de/index.xml?MOD=AJPERES";
    
$data file_get_contents($url);
echo 
$data;
?>
De todas formas en cUrl sería así:
Código PHP:
<?php
    $url 
"https://contrataciondelestado.es/wps/wcm/connect/4f63ed19-6c7f-4b91-8f7b-0d7ee34bc7de/index.xml?MOD=AJPERES";
    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL$url);
    
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse); 
    
$data curl_exec($ch);
    
curl_close($ch);
    echo 
$data;    
?>
Espero que te sirva!
Saludos!