[twitter-dev] Re: Help with twitter profile.

2009-07-08 Thread Slicey

Can anyone help?

On Jul 7, 6:25 pm, Slicey  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?
>
>  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 '';
> echo $xml;
> echo '';*/
>
> $twitter_status = new SimpleXMLElement($xml);
> foreach($twitter_status->status as $status){
>         echo '';
>         foreach($status->user as $user){
>
>         }
>         echo $status->text;
>         echo $user->followers_count;
>         echo '';
>         echo 'Posted at: '.
> $status->created_at.'';
>         echo '';
>
> }
>
> include("template/twitterfooter.php");
> ?>
>
> Function:
>
>         function getUserTimeline($options = array(), $format = 'xml') {
>                 return $this->apiCall('statuses/user_timeline', 'get', 
> $format,
> $options, true);
>         }


[twitter-dev] Re: Help with twitter profile.

2009-07-08 Thread Slicey

Can anyone help?

On Jul 7, 6:25 pm, Slicey  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?
>
>  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 '';
> echo $xml;
> echo '';*/
>
> $twitter_status = new SimpleXMLElement($xml);
> foreach($twitter_status->status as $status){
>         echo '';
>         foreach($status->user as $user){
>
>         }
>         echo $status->text;
>         echo $user->followers_count;
>         echo '';
>         echo 'Posted at: '.
> $status->created_at.'';
>         echo '';
>
> }
>
> include("template/twitterfooter.php");
> ?>
>
> Function:
>
>         function getUserTimeline($options = array(), $format = 'xml') {
>                 return $this->apiCall('statuses/user_timeline', 'get', 
> $format,
> $options, true);
>         }


[twitter-dev] Re: Help with twitter profile.

2009-07-08 Thread Slicey

Can anyone help?

On Jul 7, 6:25 pm, Slicey  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?
>
>  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 '';
> echo $xml;
> echo '';*/
>
> $twitter_status = new SimpleXMLElement($xml);
> foreach($twitter_status->status as $status){
>         echo '';
>         foreach($status->user as $user){
>
>         }
>         echo $status->text;
>         echo $user->followers_count;
>         echo '';
>         echo 'Posted at: '.
> $status->created_at.'';
>         echo '';
>
> }
>
> include("template/twitterfooter.php");
> ?>
>
> Function:
>
>         function getUserTimeline($options = array(), $format = 'xml') {
>                 return $this->apiCall('statuses/user_timeline', 'get', 
> $format,
> $options, true);
>         }


[twitter-dev] Help with twitter profile.

2009-07-07 Thread Slicey

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 to 
www.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?

getUserTimeline();

/* display the raw xml
echo '';
echo $xml;
echo '';*/

$twitter_status = new SimpleXMLElement($xml);
foreach($twitter_status->status as $status){
echo '';
foreach($status->user as $user){


}
echo $status->text;
echo $user->followers_count;
echo '';
echo 'Posted at: '.
$status->created_at.'';
echo '';
}



include("template/twitterfooter.php");
?>

Function:

function getUserTimeline($options = array(), $format = 'xml') {
return $this->apiCall('statuses/user_timeline', 'get', $format,
$options, true);
}



[twitter-dev] Re: User Clone Profiles

2009-07-01 Thread Slicey

Thanks

On Jun 29, 3:10 am, Abraham Williams <4bra...@gmail.com> wrote:
> Pretty much. 
> Usehttp://apiwiki.twitter.com/Twitter-REST-API-Method%3A-users%C2%A0show
> to get all their profile info.
>
>
>
> On Sat, Jun 27, 2009 at 09:11, Slicey wrote:
>
> > I'm building a site which allows a user to add an audio clip to their
> > twitter page.
> > eg. A user types in their username and uploads an audio clip and the
> > title. This then gets stored into a database, along with a unique
> > generated number/letter code.
> > I want it so a user can see their audio clip on their twitter page. So
> > my question is, Is it possible to automatically clone the users
> > twitter page just from their username?
> > eg. The users profile will be accessible like this:
> >http://mysite.co.uk/twitter.php?pwd=n41MO
> > It will then generate their profile from the code in the database
> > matching to the related username.
>
> > Is this possible? If so how?
>
> > Thanks.
>
> --
> Abraham Williams | Community Evangelist |http://web608.org
> Hacker |http://abrah.am|http://twitter.com/abraham
> Project |http://fireeagle.labs.poseurtech.com
> This email is: [ ] blogable [x] ask first [ ] private.


[twitter-dev] Re: User Clone Profiles

2009-06-28 Thread Slicey

Can no-one help? Please?


[twitter-dev] User Clone Profiles

2009-06-27 Thread Slicey

I'm building a site which allows a user to add an audio clip to their
twitter page.
eg. A user types in their username and uploads an audio clip and the
title. This then gets stored into a database, along with a unique
generated number/letter code.
I want it so a user can see their audio clip on their twitter page. So
my question is, Is it possible to automatically clone the users
twitter page just from their username?
eg. The users profile will be accessible like this:
http://mysite.co.uk/twitter.php?pwd=n41MO
It will then generate their profile from the code in the database
matching to the related username.

Is this possible? If so how?

Thanks.


[twitter-dev] Re: Getting users profile from their username

2009-06-18 Thread Slicey

Thanks, is there any way I would be able to do it without the
password?

On Jun 19, 12:53 am, Peter Denton  wrote:
> you can do something like this
>
>  function getUserInfo($screen_name)
>  {
>   $mas_username = 'YOURUSERNAME';
>   $mas_password = 'YOURPASSWORD';
>
>   $host = "http://twitter.com/users/show/$screen_name.xml";;
>   $ch = curl_init();
>   curl_setopt($ch, CURLOPT_URL, $host);
>   curl_setopt($ch, CURLOPT_HEADER, false);
>   curl_setopt($ch, CURLOPT_VERBOSE, 1);
>   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
>   curl_setopt($ch, CURLOPT_USERPWD, "$mas_username:$mas_password");
>   curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
>   $result = curl_exec($ch);
>   $responseInfo=curl_getinfo($ch);
>   curl_close($ch);
>
>   $status_code = intval($responseInfo['http_code']);
>   switch($status_code) {
>    case 200:
>          if (simplexml_load_string($result)) {
>       $xml = new SimpleXMLElement($result);
>      print_r($xml);
>      }
>    break;
>   }
>  }
>
>
>
> On Thu, Jun 18, 2009 at 4:44 PM, Slicey  wrote:
>
> > I'm trying to create a clone of the users twitter page.
>
> > On Jun 19, 12:25 am, JDG  wrote:
> > > Maybe I'm missing something here, but can't you just create a link to "
> >http://twitter.com/$username"; ?
>
> > > On Thu, Jun 18, 2009 at 14:47, Slicey  wrote:
>
> > > > I'm currently building a site in PHP where a user enters their
> > > > username and uploads an audio clip to our site. Then the get a tiny
> > > > url where they can view their twitter profile with the audio clip on
> > > > it.
>
> > > > Is it possible to call a users profile by their username through php?
>
> > > --
> > > Internets. Serious business.
>
> --
> Peter M. Dentonwww.twibs.com
> i...@twibs.com
>
> Twibs makes Top 20 apps on Twitter -http://tinyurl.com/bopu6c


[twitter-dev] Re: Getting users profile from their username

2009-06-18 Thread Slicey

I'm trying to create a clone of the users twitter page.

On Jun 19, 12:25 am, JDG  wrote:
> Maybe I'm missing something here, but can't you just create a link to 
> "http://twitter.com/$username"; ?
>
> On Thu, Jun 18, 2009 at 14:47, Slicey  wrote:
>
> > I'm currently building a site in PHP where a user enters their
> > username and uploads an audio clip to our site. Then the get a tiny
> > url where they can view their twitter profile with the audio clip on
> > it.
>
> > Is it possible to call a users profile by their username through php?
>
> --
> Internets. Serious business.


[twitter-dev] Getting users profile from their username

2009-06-18 Thread Slicey

I'm currently building a site in PHP where a user enters their
username and uploads an audio clip to our site. Then the get a tiny
url where they can view their twitter profile with the audio clip on
it.

Is it possible to call a users profile by their username through php?