<?php
header ('Content-Type: image/png');
$img = imagecreatefrompng('http://i.imgur.com/uBaMn.png');
$color = imagecolorallocate($img, 0xFF, 0xFF, 0xFF);
imagestring($img, 1, 20, 21, $f['5'], $color);
imagepng($img);
imagedestroy($img);
?>
<?php
$url = "http://2006scape.com/services/hiscores/index_lite.ws?player1=boardwalk";
$f = explode(",", file_get_contents($url));
print_r($f);
?>
注意:$f['5']
我试图回显数组 5,但它不起作用,因为它需要在双引号或单引号中,但如果我这样做,它会准确地回显:“$f['5']”。