<?php
// functions
function gradientHexBGcolor($k=6){
return sprintf("%02X%02X%02X", 29+$k*18, 9+$k*20,9+$k*20);
}
function gradientHexFGcolor($k=6){
return sprintf("%02X%02X%02X", 260-$k*5, 260-$k*5,260-$k*5);
}
// Init Data
$fill = '';
$thisPage = $_SERVER['REQUEST_URI'];
//Enter your Twitter data here:
$twitName = "MyTwitterUsername";
$twitPass = "MyTwitterPassword";
$twitUserDataURL = "http://twitter.com/users/show/MyTwitterUsername.json";
$twitGetURL = "http://twitter.com/statuses/friends_timeline.json";
// Check if a hashtag was given?
if (!$_POST['hashtag']) {
$fill = 'Enter hashtag here...';
}
else {
$tag = $_POST['hashtag'];
$twitGetURL = "http://search.twitter.com/search.json?q=%23".$tag;
}
// cURL 1: get Userdata:
// Init cURL
$curl = curl_init();
// set Userdata URL
curl_setopt($curl,CURLOPT_URL,$twitUserDataURL);
// prepare for return values
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
// set authentification
curl_setopt($curl,CURLOPT_USERPWD,"$twitName:$twitPass");
// get + decode return values
$returnUser = json_decode(curl_exec($curl));
// close cURL
curl_close($curl);
// cURL 2: get timeline or tag search data:
// Init cURL
$curl = curl_init();
// set URL
curl_setopt($curl,CURLOPT_URL,$twitGetURL);
// prepare for return values
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
// set authentification
curl_setopt($curl,CURLOPT_USERPWD,"$twitName:$twitPass");
// get + decode return values
$return = json_decode(curl_exec($curl));
// close cURL:
curl_close($curl);
// define & output css style definitions:
echo '<style type="text/css">
div, .twitapi a, p, span, table, td, input, textarea, b, blockquote, th, form {font-family:Tahoma,Trebuchet MS,Arial,sans-serif;font-size:8pt;border:0;margin:0;padding:0;line-height:140%;}
div.twitapi {width:540px;background:#CDCDCD;padding:6px 0;}
.twitapi p, .twitapi br {display:none;}
.twitapi hr {border:0;border-top:1px dotted #FFF;}
.twitapi table {#position:relative;border:0;border-collapse:collapse;width:100%;}
.twitapi table td {width:50%;border:0;padding:0;overflow:hidden;}
pre {color:#000;text-decoration:none;border:0;margin:0;padding:0;}
.twitapi a, .twitapi img,.twitapi span,.twitapi div {color:#FFF;text-decoration:none;border:0;margin:0;padding:0;}
div.outer {margin:6px 3%;padding:0;width:94%;}
div.wrap {#position:relative;display:table;height:48px;text-align:left;margin:6px 3%;padding:0;width:94%;}
div.text {#position:absolute;#top:50%;display:table-cell;vertical-align: middle;padding:0;}
.twForm {color:#FFF;padding:0;}
.twForm span {display:block;height:24px;margin:0;padding:0;overflow:hidden;}
.twForm input, button, textarea, select {width:100%;height:100%;border:0;padding:5px;color:#FFF;overflow:hidden;}
.twForm .button {text-align:right;}
.twForm .button:hover {color:#'.gradientHexBGcolor(7).';}
.twForm textarea {font-weight:bold;}
div.inner {#position:relative;#top:-50%;overflow:auto;margin:0 10px;}
a.img {display:inline;float:left;width:48px;height:48px;overflow:hidden;}
a.img img {width:48px;height:48px;border:0;}
</style>';
// output twitter container & headline & buttons
echo '<div class="twitapi">
<div class="wrap" style="background-color:#'.gradientHexBGcolor().';">
<table><tr><td>
<a class="img" href="'.$returnUser->profile_image_url.'"><img src ="'. $returnUser->profile_image_url.'"></a>
<form class="twForm" action="" method="POST"><input name="line" value="" type="hidden">
<span><textarea readonly style="background-color:#'.gradientHexBGcolor(6).';">'.$twitName.'\'s timeline</textarea></span>
<span>
<input class="button" style="background-color:#'.gradientHexBGcolor(2).';" value="Refresh now!" type="submit">
</span>
</form>
</td>
<td>
<form class="twForm" action="'.$thisPage.'" method="POST">
<span>
<input class="text" style="background-color:#'.gradientHexBGcolor(8).';" name="hashtag" value="'.$tag.$fill.'" type="text">
</span>
<span>
<input class="button" style="background-color:#'.gradientHexBGcolor(4).';"value="Search now!" name="submit" type="submit">
</span>
</form>
</td>
</tr></table>
</div>
<hr>';
// output tweets
// output friends' timeline if no hashtag given, else tweets with hashtag
if (!$tag) {
foreach($return as $key=>$tweet) {
if ($key<=10) {
$text = $tweet->text;
// Add links to URLS
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" rel=\"nofollow\">\\0</a>", $tweet->text);
// Add links to Twitterprofiles with @
$text = preg_replace("#(^|[\n ])@([^ \"\t\n\r<]*)#ise", "'\\1<a href=\"http://www.twitter.com/\\2\" >@\\2</a>'", $text);
// Add links to hashtags #
$text = preg_replace("#(^|[\n ])\#([^ \"\t\n\r<]*)#ise", "'\\1<a href=\"http://hashtags.org/search?query=\\2\" >#\\2</a>'", $text);
echo '<div class="wrap" style="background-color:#'.gradientHexBGcolor($key).';">
<a class="img" href="http://twitter.com/'. $tweet->user->screen_name.'"><img src ="'. $tweet->user->profile_image_url.'"></a>
<div class="text">
<div class="inner" color="#'.gradientHexFGcolor($key).'">
<a href="http://twitter.com/'. $tweet->user->screen_name.'">'. $tweet->user->screen_name.'</a>:
'.$text.' >>'. $tweet->source.'</div></div></div>';
}
}
}
else {
foreach($return->results as $key=>$tweet) {
if ($key<=10) {
$text = $tweet->text;
// Add links to URLS
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" rel=\"nofollow\">\\0</a>", $tweet->text);
// Add links to Twitterprofiles with @
$text = preg_replace("#(^|[\n ])@([^ \"\t\n\r<]*)#ise", "'\\1<a href=\"http://www.twitter.com/\\2\" >@\\2</a>'", $text);
// Add links to hashtags #
$text = preg_replace("#(^|[\n ])\#([^ \"\t\n\r<]*)#ise", "'\\1<a href=\"http://hashtags.org/search?query=\\2\" >#\\2</a>'", $text);
echo '<div class="wrap" style = "background-color:#'.gradientHexBGcolor($key).';">
<a class="img" href="http://twitter.com/'. $tweet->from_user.'"><img src ="'. $tweet->profile_image_url.'"></a>
<div class="text">
<div class="inner" color="'.gradientHexFGcolor($key).'"><a href="http://twitter.com/'. $tweet->from_user.'">'. $tweet->from_user.'</a>:
'.$text.' at '. date('M d,Y',strtotime($tweet->created_at)).'</div></div></div>';
}
}
}
echo '</div>';
?>
Feb 28
More then 20000 users have contributed to the growth of the project OpenStreetMaps. Using wiki principles the project collects information about streets, buildings, rivers, landscapes and everything that is usually displayed on maps. The agency Itoworld has created a video that animates the coverage of the gathered data. Really beautiful:
So you say: What do I need another free map service for? Is Google Maps not enough?.
Check out this comparison by Bodenseepeter [in German, illustrated]. He analyzed the extend of the two map services usinng ten examples worldwide. For example Cape Town:
| Left in Google Maps | Right in OpenStreetMaps|
|
|
Wikipedia:
OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world. The maps are created using data from portable GPS devices, aerial photography and other free sources. Both rendered images and the vector dataset are available for download under a Creative Commons Attribution-ShareAlike 2.0 licence.
via T3N magazine Germany
Jan 10
Looks good, at the first glance I can see new functions like statistics and AJAX boxes that open without the page being reloaded…:
Activate your new Flickr Layout by following the one-step-instruction here:
via Dotdean
Sep 11
Ouha, this is a handy tiny Firefox addon. It has only 42 downloads yet, cause it’s experimental. Works fine in my FF3. Fully recommended. Get it here:
Bigups to Alexandre Bezroutchko
Aug 31
Sweetcron is a service that brings you the features of friendfeed and tumblr. Apart from the fact that it’s build for being hosted at your own web server. Kind of a wordpress for feeds. Check the developers site yongfook.com for a working demo blog.
Update: Sweetcron Beta is out for evaluating:
It’s closed beta right now, but the developer, Yongfook, promises to launch it soon. It is going to be 100% open source and offers some more features:
Check the Interview with Yongfook on Lifestreamblog.com
via t3n
Aug 25
I just gathered some interesting news from Mister Wong:
Zattoo is a RIA [Uhm, just call it a program] that let’s you watch TV on your Compu without extra hardware [PCI tv-card] or a subscription to a commercial service. Zattoo is currently focussed on European channels and licensed content, and it’s completely free.
I was disappointed when I realized that I can’ watch BBC2 or Canal+, because my IP address is recognised as being German, and legal regulations prevent us to watch programs we probably haven’t payed broadcasting fees for. Maybe you can bypass this limitation using an Open Proxy Service, see the link below.
On the other hand, it’s just as simple as switching on the Telly.
Zatto is based on peer-to-peer technology, just like Hobnox, Pando, Joost: or Miro. In a Peer-to-Peer TV system, each user is simultaneously downloading the program to watch it, but also uploading the video stream to other users. This way, all users contribute to the overall bandwidth of the service. The streams are usually slightly delayed to the original sources. But the video quality is better if there are more users, which makes powerful servers farms needless.
Zattoo itself provides very smooth streaming quality and might be considered the service experts were waiting for – due to it’s simplicity.
Check the links for more information:
Zattoo delivers live TV legally, just like a cable network. Presently Zattoo doesn’t create its own channel from archival contents, nor do we yet carry user-generated content. Instead, we work with broadcasters to re-distribute their content simultaneous, unaltered, and unabridged. Compared to Joost, we provide live TV viewing instead of archival content delivered on-demand.
Sugih Jamin, Chairman and Co-founder of Zattoo
Jun 30
Great news for everyone who can not decide about going open source from the scratch:
You can now download the [stubidnamed] software Wubi from wubi-installer.org. Wubi installs a full Ubuntu Hardy Haron system within windows.

No need to burn a CD. Just run the installer, enter a password for the new account, and click “Install”, go grab a coffee, and when you are back, Ubuntu will be ready for you. You keep Windows as it is, Wubi only adds an extra option to boot into Ubuntu. Wubi does not require you to modify the partitions of your PC, or to use a different bootloader, and does not install special drivers.
After starting the application, you have options for the user interface to choose from:
Then, Wubi starts to download the operating system from a Ubuntu server repository and installs it automatically regarding to your hardware. After rebooting, you can choose whether to start your computer into Windows or Ubuntu. As simple as making a sandwich.
Minimum requirements:
Sounds great. I am trying it just now. Really curious if it can compete in the everyday system battle.
May 22
I stumbled across a popular buzzword just a few days ago: OpenMac, a promising base operating system that is ready to be obtained from a company called Psystar in a bundle with an “Open Computer”. Based on this, customers are able to install MacOS Leopard on a simple Intel / x86 hardware:
With the EFI V8 emulator it is possible to install Leopard’s kernel straight from the DVD that you purchased at the Apple store barring the addition of a few drivers to ensure that everything boots and runs smoothly
Psystar is marketing this as a cheaper and more expandable alternative to a genuine Apple Mac. I don’t know what these machines are capable of. We all think: Hopefully, finally, a legal MacOS Clone might hit the scene. Perhaps it will help people who don’t want to afford expensive Apple hardware to run Apple software on their cheap machines?
Actually, the OpenMac company Psystar clone is close to a Cease and Desist order tasked by Apple. Which basically means that Apple will make use of their copyright rules included in Leopards License Agreement:
You agree not to install, use or run the Apple Software on any non-Apple-labeled computer, or to enable others to do so.
Let’s wait and observe. Surely Apple will not tolerate that. Either by weapons of law or by technical regulations [That means non-compatible updates].
BTW: There is another open source project called “OpenMac” powered by Meshnetics, but this one regards to the Medium Access Control Layer and not to the Apple computer.
May 08