1
とTwitterのAPIを使用しているとき、私はリストにHTTPリクエストは、simplexml_load_file
if(($xml = simplexml_load_file('http://api.twitter.com/1/statuses/user_timeline.xml?count=5&screen_name=les_sismo')) !== FALSE) {
$tweets = $xml->xpath("/statuses/status");
foreach($tweets as $tweet) {
$text = $tweet->text;
echo '<li>' . $text . '</li>';
}
}
else echo 'error';
そして、私が得たすべての2警告
Warning: simplexml_load_file(http://api.twitter.com/1/statuses/user_timeline.xml?count=5&screen_name=les_sismo) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /homez.466/sismodes/www/wp-content/themes/sismo/header.php on line 89
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://api.twitter.com/1/statuses/user_timeline.xml?count=5&screen_name=les_sismo" in /homez.466/sismodes/www/wp-content/themes/sismo/header.php on line 89
error