K
K
KRHD2015-11-08 15:17:03
PHP
KRHD, 2015-11-08 15:17:03

Why doesn't file_get_contents work?

Why does not it work:

$Content = file_get_contents('http://mcdonate.ru/api/mcd_script.js?server_id=24418&container_id=mcdApiContainer&raw_data');
echo $Content;

?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sunrails, 2015-11-08
@sunrails

What is allow_url_fopen in php.ini ?

D
Dimonchik, 2015-11-08
@dimonchik2013

briefly here:
https://toster.ru/search?q=file_get_contents
long: fgc headers can be such that the remote server will understand that this is a bot and will not return the page,
for correct operation - cURL or sockets

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question