While Retrieve The Searched tweet to My Application i got an Parser Error string could not be parsed as xml simplexmlelement…
Code Is :
<?php
$xmldata = 'https://api.twitter.com/1/statuses/user_timeline.xml?include_entities=true&include_rts=true&screen_name=cloudmagic&count=2';
$open = fopen($xmldata, 'r');
$content = stream_get_contents($open,-1);
fclose($open);
$xml = new SimpleXMLElement($content);
?>
| <? echo $xml->status[0]->text ?> |
error :
Fatal error: Uncaught exception ‘Exception’ with message ‘String could not be parsed as XML’ in C:\wamp\www\new\Untitled-11.php:7 Stack trace: #0 C:\wamp\www\new\Untitled-11.php(7): SimpleXMLElement->__construct(’’) #1 {main} thrown in C:\wamp\www\new\Untitled-11.php on line 7