Questions tagged as 'file-get-contents'

1
answer

Problem with fopen

This file is performing its function perfectly, but it is returning some errors and I would like to correct them. I need to know if I have to use fopen and file_get_contents because I can not undo any. # /pasta/copy.php <?php...
asked by 14.03.2015 / 22:45
1
answer

Problems with reading and writing

Assuming you have an access log, each request will create or add values to the log file. Simulating multiple requests via ajax, I've found that there is always a problem. If you enter the browser console and run the code below, a request will...
asked by 08.12.2014 / 02:51
1
answer

Picking up hidden data with the noscript tag with file_get_contents

I would like to retrieve information from a CAPTCHA on one form and display it on another using file_get_contents . It happens that the page where the data is has the tag <noscript> that warns:    "Please enable Javascri...
asked by 31.07.2017 / 17:32
2
answers

Error installing Composer on Windows 7 64bit with Wampserver 2.5

I'm trying to install Composer on W7 64bits. Using the installer for Windows that the Composer Web site provides (Composer-Setup.exe). I have installed Wampserver 2.5 with php5.5.12 and Apache2.4.9. Openssl is enabled in php.ini. I'm havin...
asked by 19.04.2015 / 12:47
1
answer

Ignore http error code when using file_get_contents

I'm using file_get_contents to make a request to a url. This request may return a 422 error. When this 422 error is returned, I need to capture the body, which comes in JSON format. However, file_get_contents d...
asked by 29.11.2016 / 20:19
0
answers

Get content from a page with PHP [closed]

I'm getting all the contents of a page with the code: <?php $url = 'http://www.teste.com.br'; $dadosSite = file_get_contents($url); echo $dadosSite; ?> It works normally and was better than using iframe . However, at the top of the p...
asked by 21.08.2017 / 02:04
1
answer

Get contents source code in Javascript

Hello, I'm trying to use a javascript to read the source code of another page and write that content inside a div. <script type="text/javascript"> $.get('teste.php', function(data) { document.getElementById('somediv').innerHTM...
asked by 09.08.2018 / 23:43
1
answer

Send POST file with php using the file_get_contents function

Is there a way to send a file via file_get_contents without manually manipulating the request header?     
asked by 01.06.2017 / 00:52
1
answer

How to do the fread () function fetch data every 30 seconds without refreshing the page

I want the fread() or file_get_contents() function to search data in the file every 30s, but without updating the page, I tried and can not do how I can do it?     
asked by 04.08.2017 / 04:27
1
answer

Problems with file_get_contents and DOMDocument

I'm trying to download content from a website, but it's giving this warning:    'DOMDocument :: loadHTML (): Unexpected end tag: tr in Entity And it is indicating several lines. I can not fix the accent either. Could anyone help me und...
asked by 21.01.2016 / 13:04