-1

where i can find file_get_contents() function and repalce it with Curl

A PHP Error was encountered

Severity: Warning

Message: file_get_contents() [function.file-get-contents]: https:// wrapper is disabled in the server configuration by allow_url_fopen=0

Filename: controllers/videos.php

Line Number: 281

1
  • ehm, as it says, you can find that call in the file controllers/videos.php... Jan 9, 2015 at 12:47

1 Answer 1

1

Edit the file controllers/videos.php and replace the file_get_contents() call with libcurl calls as shown here PHP : how can use curl instead file_get_contents, so:

$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
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.