我有一个PHP脚本,基本上尝试转换它来自的字符串:
https://camwijs.nl/system/avatarimage.aspx?username=
到
https://www.habbo.com/habbo-imaging/avatarimage?figure=
如果我运行代码,它只会给我一个包含错误消息的页面:
警告:file_get_contents(https // camwijs.nl / system / avatarimage.aspx?username = nomakta):无法打开流:/home/u750368594/public_html/v1/avatar/avatar.php中没有此类文件或目录在第4行 http://www.habbo.com/habbo-imaging/avatarimage?figure=
以下是代码:
<?php
// gets avatar with GR
$camwijsAvatarurl = "https//camwijs.nl/system/avatarimage.aspx?username=".htmlspecialchars($_GET["name"]);
// displays avatar link here
echo 'http://www.habbo.com/habbo-imaging/avatarimage?fgure=' .file_get_contents($camwijsAvatarurl);
?>