-1

I install Asterisk now 6.12 32 bit, and run code php like this:

<?php 
    $link = 'http://www.bongda.com.vn/feed/';
    $content = file_get_contents($link);
    print_r($content);
?>

file_get_contents not working :( ,but i can run code php on wamp server in windows 7.

Michael
  • 32,527
  • 49
  • 210
  • 370
  • 2
    "__not working__" is half way to get your question closed. Add this at the top of your php script, `error_reporting(E_ALL); ini_set('display_errors', '1');` what does it spit ? – Pedro Lobito Apr 29 '15 at 17:56

1 Answers1

0
  • Stream Wrapper for URL could be missing from PHP installation
  • allow_url_fopen is disables in /etc/php.ini
  • Some kind of firewall settings (iptables) prevent outgoing access

To help debugging, check /var/log/httpd/error_log. I would presonally suggest using the php cURL library for online sources instead of file_get_content.

viktike
  • 717
  • 4
  • 7