Questions tagged as 'file-get-contents'

3
answers

Search word with file_get_contents

How can I use file_get_contents to search for the word "team" in the site and if it finds the word echo the word? <?php $content = file_get_contents( 'https://www.hostgator.com.br' ); $busca = 'equipe '; ?>     
asked by 17.11.2015 / 20:48
2
answers

Difference between file_get_contents and curl?

I wonder if there is any difference between using cURL and file_get_contents and which one is safer? Home Thanks in advance.     
asked by 13.06.2016 / 18:31
2
answers

Problems with Curl result and file_get_contents

I'm trying to get an image from a website to use imagecreatefrompng (), but the result was never what I expected ... Url: link in the case when I call as <img> works perfectly <img src="https://www.habbo.com.br/habbo-i...
asked by 18.01.2017 / 14:16
2
answers

How to save facebook profile photo in the database?

I have a button that when I click, connects to facebook and displays the person's data in a registration form, in that form to a text field that returns the following: http://graph.facebook.com/'.$fb_id.'/picture?width=300 I would like...
asked by 06.04.2015 / 18:07
3
answers

json_decode returns null

I have a JSON file that is in this link . I need to get and display the data in PHP, I have the following code to test: $linkAnapro = 'http://s.anapro.com.br/a-p/dados/b3gkhu%252f3ohE%253d/estoque.json'; $output = file_get_contents($linkAn...
asked by 06.04.2015 / 19:48
1
answer

How to read the result of a file to a variable passing POST parameters?

We can get the result of executing a URL for a variable using the file_get_contents ( ) : <?php $pagina = file_get_contents('http://www.meusite.com/'); echo $pagina; ?> But how can we extend this functionality by passing parameters o...
asked by 22.12.2013 / 16:47
1
answer

What function does it allow to open .txt file and run other functions in the contents of this .txt?

What function in C language does it allow to open file .txt and run other functions in the contents of this .txt ?     
asked by 21.11.2018 / 20:37
2
answers

Break txt file into blocks, and each block in lines

I have an "active.txt" file where you can find information blocks Ex: SACOLAO CENTER R RUA PAULINO MENDES LIMA,31 CENTRO...
asked by 10.07.2015 / 17:50
2
answers

SSL error with file_get_contents

When I try to open a url through file_get_contents , I'm having problems when the page is https . I do not speak of external pages, but in some libraries where the images of the application itself is opened by file_get_contents...
asked by 24.06.2016 / 20:10
1
answer

php can not copy remote file, but it downloads via browser

Hello. This file: link I can download through the browser, but I can not copy directly to my server using PHP. I have tested all possible ways (copy (), file_gets_content (), fopen (), curl (), etc) and there is no way to make it work. H...
asked by 10.11.2016 / 16:33