Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/08/2018, 18:15
xoceunder
 
Fecha de Ingreso: junio-2012
Ubicación: En el Mundo
Mensajes: 759
Antigüedad: 11 años, 10 meses
Puntos: 10
Respuesta: duda en capturar archivos por web

Tengo esto ya pero como puedo hacer para meter todo lo que acturo como para poder hacer url con las carpetas que ya estan


Código PHP:
Ver original
  1. <?php
  2. ini_set('error_reporting', E_ALL);
  3. ini_set('display_errors',1);
  4.  
  5. function file_get_contents_curl( $url ) {
  6.  
  7.   $ch = curl_init();
  8.   curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
  9.   curl_setopt( $ch, CURLOPT_HEADER, 0 );
  10.   curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, FALSE );
  11.   curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );
  12.   curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
  13.   curl_setopt( $ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
  14.   curl_setopt( $ch, CURLOPT_URL, $url );
  15.   curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );
  16.   $data = curl_exec( $ch );
  17.   curl_close( $ch );
  18.   return $data;
  19.  
  20. }
  21.  
  22. $input_lines=file_get_contents_curl("https://megaiptv.us/peliculas/");
  23. preg_match_all("/(.*)/", $input_lines, $output_array);
  24. foreach($output_array as $key => $val){
  25.    echo "Key: ".$key.", Value: ".$val."<br/>\n";
  26. }

Última edición por xoceunder; 28/08/2018 a las 18:39