Im using simplexml to get the twitter profile avatar url from the xml status page.
this is the code im using
<?
$username = twitter;
$xml = simplexml_load_file("http://twitter.com/users/".$username.".xml");
echo $xml->user->profile_image_url;
?>
The xml page loads when i visit it, but for some reason nothing is being echoed. No errors. Nothing.
When i visit it in a browser, i get this:
<?xml version="1.0" encoding="UTF-8"?>
<user>
<id>783214</id>
<name>Twitter</name>
<screen_name>twitter</screen_name>
<location>San Francisco, CA</location>
<description>Always wondering what everyone's doing.</description>
<profile_image_url>http://a1.twimg.com/profile_images/75075164/twitter_bird_profile_normal.png</profile_image_url>
<url>http://twitter.com</url>.....
(the rest is long and irrelevant to the question)
The data is there, why wont it echo?