【发布时间】:2012-01-27 07:57:05
【问题描述】:
*在这里完成 PHP 菜鸟。我正在尝试编写返回 tumblr 头像的简单 php。 Tumblr 有一个地址,您可以导航到该地址以检索博客头像。例如导航到:
http://api.tumblr.com/v2/blog/david.tumblr.com/avatar/512
导致:
http://27.media.tumblr.com/avatar_a963092d964b_512.png
我只是想要 .png 地址作为变量。这是我得到的,但它只是吐出一大页奇怪的文字。
<?php
$avatar = file_get_contents("{the link above, I can only have two hyperlinks in a post}");
echo $avatar;
?>
我假设 file_get_contents 不是我想要使用的,但我不知道该使用什么。
【问题讨论】:
标签: tumblr