I'm having a small problem querying a URL with JSON
file. Basically my code returns bool(false)
.
$usuario = 'root';
$senha = '123';
$header = 'Authorization: Basic ' . base64_encode($usuario . ':' . $senha) . "\r\n";
'Content-Type: application/json;charset=UTF-8';
opções fornecidas na options predefinição.
$context = stream_context_create(array(
'http' => array(
'header' => $header
)
)
);
error_reporting(0);
$arquivo = "https://127.0.0.1:9088/xd/servidor/?serie=2018&?number=424";
$info = file_get_contents($arquivo);
var_dump($info);
If I instead of the url directly pass the file name, for example file.json , my var_dump()
normally reads the code, however to access the URL it does not read. >
Can anyone help me?
Thank you