【发布时间】:2020-01-30 05:42:21
【问题描述】:
我正在尝试从 Habbo API 中提取文本内容,但我收到错误警告:file_get_contents (https://www.habbo.it/api/public/users?name=Adaara): failed to open stream: HTTP request failed! HTTP / 1.0 463 HTTP 请求在 file_get_contents 中失败。
<?php
error_reporting(E_ALL);
$url = "https://www.habbo.it/api/public/users?name=Adaara";
$json = file_get_contents($url);
$json = json_decode($json, true);
echo $json['motto'];
?>
我希望打印数组的座右铭值。 提前感谢您的回答。
【问题讨论】:
-
我收到“无法打开流:HTTP 请求失败!HTTP/1.1 463”。
-
@AlexBarker 否,基于 linux 的托管
标签: php webserver user-agent