【发布时间】:2009-07-08 22:00:18
【问题描述】:
我收到以下信息:
<links>
<image_link>http://img357.imageshack.us/img357/9606/48444016.jpg</image_link>
<thumb_link>http://img357.imageshack.us/img357/9606/48444016.th.jpg</thumb_link>
<ad_link>http://img357.imageshack.us/my.php?image=48444016.jpg</ad_link>
<thumb_exists>yes</thumb_exists>
<total_raters>0</total_raters>
<ave_rating>0.0</ave_rating>
<image_location>img357/9606/48444016.jpg</image_location>
<thumb_location>img357/9606/48444016.th.jpg</thumb_location>
<server>img357</server>
<image_name>48444016.jpg</image_name>
<done_page>http://img357.imageshack.us/content.php?page=done&l=img357/9606/48444016.jpg</done_page>
<resolution>800x600</resolution>
<filesize>38477</filesize>
<image_class>r</image_class>
</links>
我希望尽可能简单地提取 PHP 中的 image_link。我该怎么做?
假设,我不能为 PHP 使用任何额外的库/插件。 :)
谢谢大家
【问题讨论】:
-
SimpleXML 是“额外”库吗?
-
不,SimpleXML 是 PHP 内置的。