PHP Tweet Reader for Mobile Web (NON JS)- User Documentation
  Thank you for downloading my scripts, we will update regularly this script, and add the feature you need, so please, feel free to drop us a line with your ideas and suggestions!

Requirements

PHP version 4.3 or greater & writable permissons for 'cache' directory.

 

Install / Configuration

1. Open 'index.php'

config.php

2. Edit the line '4' for your twitter username. (example: $twitter->user = 'yaaya_mobi'; )

 

Additional Variables

For use additional varibales, simply add "<?php echo $my_twitter['YOUR_VARIABLE'] ?>"

EX: if you want to display your total tweets counter, you can add the line "<?php echo $my_twitter['statuses_count'] ?>"

custom

* List of avilable varibales.

Variable Info (value return)
profile_background_color your twiter profile background color
profile_background_image_url your twiter profile background image url
profile_image_url url to your twiter profile picture
profile_text_color your twiter profile text color
profile_link_color your twiter profile link color
profile_sidebar_fill_color your twiter profile sidebar fill color
profile_sidebar_border_color your twiter profile sidebar border color
description profile bio
created_at twiter account created date
location Where in the world are you?
followers_count total followers
screen_name username
friends_count total following users count
statuses_count count of total tweets
name your real name
id twitter ID
url web
 

A little description about default tweet reader page for make your own customizations.

Step 1) Initialize Script

init

include('TweetReader.class.php'); * this is a standard php include if you keep the default file tree this will be the line you'll use.

$twitter = new TweetReader(); * this is the initialization of the class.

$twitter->user = 'YOUR_TWITTER_USERNAME'; * set twitter username to grab data.

$twitter->postLimit = 10; Optional: Set the post limit ~ maximum value =20 .

$twitter->cache= 'cache/'; set folder path to save local cache of Twitter update

$twitter->cachExpire = 300; Optional: set seconds that cache is classed as "old"

$twitter->debug = false; Optional: turn on or off degug mode (true/false)

$twitter->targetNew = true; Optional: open links in new tab (true/false)

$twitter->init(); * call to generate the stuff

$my_twitter=$twitter->data; * retrieve data to local varibale '$my_twitter'

 

Default tweet reader page:

<?php
include('TweetReader.class.php');
$twitter = new TweetReader(); // Call TweetReader class
$twitter->user = 'google'; // Set the user to get info from
$twitter->postLimit = 10; // Optional: Set the post limit ~ maximum of 20 posts
$twitter->init(); // Generate the stuff
$my_twitter=$twitter->data; //retrieve data

?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $my_twitter['name'] ?>'s Tweets</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="head">
<table width="100%" cellspacing="5px;">
<tr>
<td class="icon"><img src="<?php echo $my_twitter['img'] ?>" alt="pic" /></td>
<td>
<div class="user">
<a href="<?php echo $my_twitter['user_profile'] ?>"><img src="http://twitter-badges.s3.amazonaws.com/t_mini-b.png" alt="Follow yaaya_mobi on Twitter"/></a> <?php echo $my_twitter['name'] ?>'s Tweets
</div>
<span class="followers"><?php echo $my_twitter['followers'] ?>, <?php echo $my_twitter['statuses_count'] ?> Tweets</span><br />
&rsaquo; <a href="<?php echo $my_twitter['user_profile'] ?>">Follow @<?php echo $my_twitter['screen_name'] ?></a>
</td>
</tr>
</table>
</div>
<?php if($my_twitter['is_available']) { ?>
<ul class="tweets">
<?php foreach($my_twitter['tweets'] as $tweet){ ?>
<li><i>&quot;</i> <?php echo $tweet['text'] ?> <i>&quot;</i><br /><img src="images/min_twt.gif" alt="" width="13" height="13" /> <span class="time"><?php echo $tweet['time'] ?></span></li>
<?php } ?>
</ul>
<?php } else { ?>
<div class="error">@<?php echo $my_twitter['user'] ?> hasn't tweeted yet.</div>
<?php } ?>
<div class="footer">&lsaquo; <a href="/">HOME</a></div>
<!-- you can remove this line --><div class="dev">Mobi Scripts by <a href="http://yaaya.mobi/?scripts">Yaaya</a></div>
</body>
</html>

  Help: contact me via email: contact@1mobilizer.com/ gtalk: lakshan1989
  The license under which the 'PHP Tweet Reader Mobile Web Widget' software is released is the GPLv2 from the Free Software Foundation. 
  Script By Yaaya.mobi , Orginal Class axllent.org