From dab49f0aad753df697e16d388985632519e11d1e Mon Sep 17 00:00:00 2001 From: Hari K T Date: Thu, 2 Feb 2012 23:43:56 +0530 Subject: [PATCH] Initial commit --- README.md | 5 +++ twitter.php | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 README.md create mode 100644 twitter.php diff --git a/README.md b/README.md new file mode 100644 index 0000000..6ca668a --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +Just experiments with twitter. +A single php file to get the relational tweets. +Try at http://harikt.com/twitter.php +Fork and give pull requests if you love :-) +Tested in PHP v 5.3 + with curl enabled. diff --git a/twitter.php b/twitter.php new file mode 100644 index 0000000..d164a14 --- /dev/null +++ b/twitter.php @@ -0,0 +1,90 @@ + $contents->text, + 'screen_name' => $contents->user->screen_name, + 'profile_image_url' => $contents->user->profile_image_url, + 'status_id' => $id + ); + if( $contents->in_reply_to_status_id_str == null ) { + return $content; + } else { + $co[] = $content; + // Recursion + $co[] = buildRelation($contents->in_reply_to_status_id_str, $ch); + } + return $co; +} +?> + + + + + Build relationship to what the message was + + +
Brought to you by Hari K T. Hosting sponsored by vps.fm
+
+

Just experiment projects :D. Place the status from twitter.

+

Eg : https://twitter.com/#!/harikt/status/164665331833520128 , and get the remaining ;-)

+

Fork me at GitHub

+

+
+
+ + +
+
+
+"; + foreach( $results as $result ) { + //Sometimes the text becomes empty :P , why ? Want to look :D + if(! empty($result['text']) ) { + echo "
  • {$result['text']} + + +
  • "; + } + } + echo ""; + } + } +?> +
    + +