*完成PHP noob这里。我试图写简单的PHP,返回一个tumblr头像。 Tumblr有一个地址可以导航到,以撤消博客头像。例如导航到:Tumblr API Avatar
http://api.tumblr.com/v2/blog/david.tumblr.com/avatar/512
导致这个:
http://27.media.tumblr.com/avatar_a963092d964b_512.png
我只是想在巴纽地址作为一个变量。这是我得到的,但它只是吐出一大页奇怪的文字。
<?php
$avatar = file_get_contents("{the link above, I can only have two hyperlinks in a post}");
echo $avatar;
?>
我假设file_get_contents不是我想要的,但我不知道要用什么。