包含 PHP 输入的图像源

Image Source to Include a PHP Input

我正在尝试创建一个图像,该图像根据从 icecast 服务器抓取的类型而变化,我很确定我的基本代码是正确的我想我只是错误地输入了 PHP 变量。

<?php
            $stats = $core->radioInfo( "http://http://sc.onlyhabbo.net:8124/status-json.xsl" );
            ?>
<img src=http://www.habbo.com/habbo-imaging/avatarimage?user=<?php
                        echo $stats['genre'];
                    ?>&action=std&direction=2&head_direction=2&gesture=sml&size=m&img_format=gif/>

是完整代码。我是否输入了错误的 PHP 变量

你的 Html 中的引号在哪里?

<img src="http://www.habbo.com/habbo-imaging/avatarimage?user=<?php
                    echo $stats['genre'];
                ?>&action=std&direction=2&head_direction=2&gesture=sml&size=m&img_format=gif"/>

更新每个人

这个问题现在已经解决了,我决定为此采用 CURL 路线,起初它不起作用,直到我的主机提高了我们的 CloudLinux 进程限制。我不确定这段代码的实际问题是什么,但 CURL 路由工作正常。感谢您的任何回答