Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mikhail  >  Tweets from User Puller  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: example where I'm pulling twits for my twitter accaunt
Class: Tweets from User Puller
Retrieve the latest tweets of an user or hash tag
Author: By
Last change: fixed problem with loop.

thanks to Greg Milby
Date: 2012-12-16 19:36
Size: 648 bytes
 

Contents

Class file image Download
<?php
include_once("get_twits.php");
$data = array(
                
"user"     => "HubSpot",
                
"count_tw" => "10",
                
"hash_t"   => ""
              
);
$twits = new tweets_for_user($data);
?>
<html>
<table width="600px" align='center'>
<th>date</th> <th>What happen</th>    <th>link</th>     
<?php
for($i=0;$i<count($twits->result['date']);$i++) 
{
    echo(
"<tr>");
    echo(
"<td>".$twits->result['date'][$i]."</td>");
    echo(
"<td>".$twits->result['description'][$i]."</td>");
    echo(
"<td><a href='".$twits->result['link'][$i]."'>link</a></td>");
    echo(
"</tr>");


?>
</table>
</html>