/ / donde puedo encontrar la función file_get_contents () y volver a compilarla con Curl - function, curl, file-get-contents

donde puedo encontrar la función file_get_contents () y volver a compilarla con Curl - function, curl, file-get-contents

donde puedo encontrar la función file_get_contents () y volver a compilarla con Curl

Se ha encontrado un error PHP

Severidad: Advertencia

Mensaje: file_get_contents () [function.file-get-contents]: https: // wrapper está deshabilitado en la configuración del servidor por allow_url_fopen = 0

Nombre de archivo: controllers / videos.php

Número de línea: 281

Respuestas

1 para la respuesta № 1

Edita el archivo controllers/videos.php y reemplazar el file_get_contents() llamar con libcurl llamadas como se muestra aquí PHP: cómo puede usar curl en lugar de file_get_contents, asi que:

$url = "https://graph.facebook.com/" . base_url() . "videos/videos_watch/" . $id_video";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$data = curl_exec($ch);
curl_close($ch);
// do something with $data