Top "File-get-contents" questions

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

file_get_contents with empty file not working PHP

I try to use file_get_contents form PHP but it's not working. There is my code : $filename = "/opt/gemel/…

php file file-get-contents fgets
use php read file on network with ip or computername

When i use php read file on LAN network through ip or computer name. $url = "\\\\192.168.0.200\\testshare\\1.txt"; if(file_exists($…

php file-get-contents file-exists
file_get_contents no caching?

I'm using file_get_contents() to load a dynamic image from an external website. The problem is that the image …

php image caching file-get-contents
Unable to file_get_contents or cURL via HTTPS

I have been using file_get_contents to grab the contents of a site for years. Recently, they updated their …

php curl https file-get-contents
PHP Get Content of HTTP 400 Response

I am using PHP with the Amazon Payments web service. I'm having problems with some of my requests. Amazon is …

php curl http-status-codes file-get-contents
Is there a way in PHP to strip whitespace from JSON without using ob_gzhandler?

I'm grabbing some JSON data using file_get_contents and I need to compress it so I can add it …

php json compression gzip file-get-contents
file_get_contents(): Content-type not specified assuming application/x-www-form-urlencoded with imgur API

I'm trying to create an app to upload profile images to imgur but I'm having a problem. if (isset($_POST[…

php file-upload file-get-contents
How can I load a remote file using file_get_contents()?

Scratching my head a bit now with this. I am trying to get a file from a remote url. I …

php file-get-contents file-put-contents
Do we need to close file_get_contents?

I'm running file_get_contents() inside a loop, I see a lot of files opened in the Apache log. I …

php file-get-contents
PHP find string in HTML

I've got an HTML page which I fetch with PHP with file_get_contents. On the HTML page I've got …

php html file-get-contents strpos