Top "File-get-contents" questions

In PHP, file_get_contents is the preferred way to read the contents of a file into a string.

Parse html table using file_get_contents to php array

I am trying to parse the table shown here into a multi-dimensional php array. I am using the following code …

php html-parsing file-get-contents
file_get_contents not working?

This code is not working to server. But It is working to my localhost (xampp) $url = file_get_contents('http://…

php regex file-get-contents
Get content between two strings PHP

Whats is the best way to obtain the content between two strings e.g. ob_start(); include('externalfile.html'); ## see …

php regex file-get-contents output-buffering
How to use file_get_contents or file_get_html?

I've read through quite a few questions on here and I'm not sure if I should be using file_get_…

php file-get-contents simple-html-dom
Simple JSON request in PHP

I have the following json country_code({"latitude":"45.9390","longitude":"24.9811","zoom":6,"address":{"city":"-","country":"Romania","country_code":"RO","region":"-"}}) …

php file-get-contents json
How to execute and get content of a .php file in a variable?

I want to get contents of a .php file in a variable on other page. I have two files, myfile1.…

php file return file-get-contents
Why I'm getting 500 error when using file_get_contents(), but works in a browser?

$html = file_get_contents("https://www.[URL].com"); echo $html; produces this in the error logs: PHP Warning: file_get_…

php file-get-contents
GET Request from PHP using file_get_contents with parameters

I want to send a GET request to an external site, but also want to send some parameters for example …

php http get file-get-contents
PHP file_get_contents does not work on localhost

I am working on my website from localhost (http://172.16.65.1/) a MAMP server on OSX. I want to load some JSON …

php localhost echo file-get-contents