Join Login

Video Tutorials

Royalty Free Images

Twitter API

By: RiverCityGraphix      Views: 4808      Share: Bookmark and Share

In this tutorial, you will learn how to retrieve data from the Twitter API using PHP and then output it.

Twitter has become increasingly popular and often you will want to display your tweets or other information on your site. This tutorial shows you how to gain access to the XML feed from the Twitter API and use it to output your data.

$xmldata = '';
$open = fopen($xmldata, 'r');
$content = stream_get_contents($open);
$xml = new SimpleXMLElement($content);

<table width="550" border="1">
<td><? echo $xml->status[0]->text; ?> at <? echo $xml->status[0]->created_at; ?></td>

Demo File

Free Source Files Zip