Login to your server via ssh and type
sudo nano /etc/php5/apache2/php.ini //<<<< ubuntu/debian server, might differ for you
in the file, simply press "ctrl + w" and type "allow_url_fopen" and Return, most probably you will come to the explanation first, so repeat the search a couple of times. Now you can change the entry from
allow_url_fopen=0
to
allow_url_fopen=1
press "ctrl + x" and confirm the file save with "y".
Then type
sudo service apache2 restart
This will restart apache so the new php.ini configuration can be loaded. After those steps, you should be able to use file_get_contents externally.
SIDENOTE
If you can’t find your php.ini file, you will find the path to the loaded php.ini file in the top section of your phpinfo()

Related Posts:
- How do I get a YouTube video thumbnail from the YouTube API?
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- http://localhost:80 is not working on running Apache server through UniServer ZeroXIII
- How do I resolve a HTTP 414 “Request URI too long” error?
- Getting an error when I visit http://localhost
- PHP + curl, HTTP POST sample code?
- Redirect vs RedirectMatch
- Can curl make a connection to any TCP ports, not just HTTP/HTTPS?
- Call to undefined function curl_init().?
- How do I get a YouTube video thumbnail from the YouTube API?
- What is the difference between the ‘www’ folder and ‘htdocs’ folder?
- CURL ERROR: Recv failure: Connection reset by peer – PHP Curl
- What is Options +FollowSymLinks?
- cURL error 60: SSL certificate: unable to get local issuer certificate
- SSL error SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- curl POST format for CURLOPT_POSTFIELDS
- HTTP Error 411, The request must be chunked or have a content length
- MAMP “Apache couldn’t be started because port is in use.” AND “Can’t connect to local MySQL server through /tmp/mysql.sock
- PHP cURL custom headers
- Only variable references should be returned by reference – Codeigniter
- Connection reset by peer: mod_fcgid: error reading data from FastCGI server
- PHP cURL HTTP PUT
- Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
- XAMPP, using port:81, cannot run localhost:81/mywebsite
- “End of script output before headers” in Apache + PHP
- How to POST JSON Data With PHP cURL?
- cURL request in Laravel
- How can I force users to access my page over HTTPS instead of HTTP?
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- Using PHP 7 with WAMP
- How to remove index.php from WordPress site URL
- cURL 28 error after switch from to brew php 7.2 on localhost
- Replace ' and similar html codes with their correspondent character?
- Google Calendar API event update always return 404 “not found” error
- How to prevent the “Confirm Form Resubmission” dialog?
- navigate back with PHP form submission
- How to set 777 permission on a particular folder? [closed]
- How do I make a redirect in PHP?
- List of All Locales and Their Short Codes?
- Difference between “as $key => $value” and “as $value” in PHP foreach
- What is a slug?
- Visual list of all installed fonts with respective pangram phrase?
- How to avoid Request Entity Too Large 413 error
- How to log in to phpMyAdmin with WAMP, what is the username and password?
- Array to String PHP?
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- Should I use mysqli_real_escape string() or mysql_real_escape_string() for form data?
- count() parameter must be an array or an object that implements countable in laravel
- regex match any whitespace
- How to fix “Headers already sent” error in PHP
- currently unable to handle this request HTTP ERROR 500
- PHP page redirect
- Whoops, looks like something went wrong. Laravel 5.0
- PHP “or” Syntax
- Fatal error: Call to undefined function mysql_connect()
- How to fix “Headers already sent” error in PHP
- “Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP
- What are namespaces?
- Get the full URL in PHP
- PDOException SQLSTATE[HY000] [2002] No such file or directory
- PDOException SQLSTATE[HY000] [2002] No such file or directory
- Mysql query- How to use contains?
- How do I get PHP errors to display?
- S_SESSION variable (user role) not recognised
- What are the main differences between PHPExcel and PhpSpreadsheet?
- Is SAJAX dead? What to replace with?
- Get the full URL in PHP
- How do I check if a string contains a specific word?
- PDOException: SQLSTATE[HY000] [2002] No such file or directory
- xajax expanding list query
- How to force file download with PHP
- How do I get a file extension in PHP?
- How to Set Category Page as Home Page in Prestashop
- Get the full URL in PHP
- Data source name not found, and no default driver specified
- mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in
- Invalid column count in CSV input on line 1 Error
- Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, object given in
- How to copy a file from one directory to another using PHP?
- How to check if a string starts with a specified string?
- what does PHP die() return
- Invalid column count in CSV input on line 1 Error
- how to replace quotation marks with \”
- How do I redirect a page in jQuery?
- mcrypt is deprecated, what is the alternative?
- How can I find my php.ini on wordpress?
- mysqli_real_connect(): (HY000/2002): No such file or directory
- Convert a PHP object to an associative array
- XAMPP Port 80 in use by “Unable to open process” with PID 4
- PHP random string generator
- How to echo or print an array in PHP?
- Fatal error: Call to undefined function mysqli_connect()
- What are the differences in die() and exit() in PHP?
- How to parse a CSV file using PHP
- How to run php files on my computer
- How to call a JavaScript function from PHP?
- Cannot use object of type stdClass as array?
- Is a new line = \n OR \r\n?
- What is difference between PHP cli and PHP cgi?