I think the absence of responses might be that there are many variables in
your code and "I cant get anything to show up" could mean anything,
including things in your include files, etc
Being much more specific about output makes it easy for the brains to help.


On Wed, Jul 8, 2009 at 8:53 AM, Slicey <sli...@live.co.uk> wrote:

>
> Can anyone help?
>
> On Jul 7, 6:25 pm, Slicey <sli...@live.co.uk> wrote:
> > Basically I am trying to make a site where a user come to the site,
> > types in their username, song title, artist title, and uploads a song,
> > this then gets stored in a database along with a random generated
> > code.
> > What I am trying to do is make a twitter clone page of the users
> > profile. eg. if a user has the username blahblah and the random code
> > in the database is 3hr8e I want it so when I go
> towww.mysite.com/twitter.php?pwd=3hr8e
> > This is what I have tried however I can't get anything to show up. Is
> > there something I'm doing wrong?
> >
> > <?php
> > require ("connect.php");
> > require ("functions.php");
> > include("template/twitterheader.php");
> > // require the twitter library
> > require "twitter.lib.php";
> >
> > $pwd = mysql_real_escape_string($_GET['pwd']);
> >         $result = mysql_query("SELECT * FROM songs WHERE pwd='$pwd'");
> >         $screen = mysql_fetch_array($result);
> >         $username = $screen['username'];
> >
> > // initialize the twitter class
> > $twitter = new Twitter($username);
> >
> > // fetch your profile in xml format
> >
> > $xml = $twitter->getUserTimeline();
> >
> > /* display the raw xml
> > echo '<pre>';
> > echo $xml;
> > echo '</pre>';*/
> >
> > $twitter_status = new SimpleXMLElement($xml);
> > foreach($twitter_status->status as $status){
> >         echo '<div class="twitter_status">';
> >         foreach($status->user as $user){
> >
> >         }
> >         echo $status->text;
> >         echo $user->followers_count;
> >         echo '<br/>';
> >         echo '<div class="twitter_posted_at"><strong>Posted at:</strong>
> '.
> > $status->created_at.'</div>';
> >         echo '</div>';
> >
> > }
> >
> > include("template/twitterfooter.php");
> > ?>
> >
> > Function:
> >
> >         function getUserTimeline($options = array(), $format = 'xml') {
> >                 return $this->apiCall('statuses/user_timeline', 'get',
> $format,
> > $options, true);
> >         }
>



-- 
Peter M. Denton
www.twibs.com
i...@twibs.com

Twibs makes Top 20 apps on Twitter - http://tinyurl.com/bopu6c

Reply via email to