I’ve been a fan of William S Burroughs for a long time.  His use of the Cut Up Technique in his writing has influenced me in music making, and also in experiments with writing.  The other day I had an inclination to create something that searched the tweetosphere and grab random “words” and put them together in some manner.

If you visit :: http://www.opensussex.net/cutup/ You’ll find my first attempt at this.  This is a very simple script.  Here is the Code.

$search = $_GET['search'];
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://search.twitter.com/search.json?q=".$search);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($curl);
curl_close ($curl);
$result_de = json_decode($result,true);
$rnd_text = '';

foreach($result_de['results'] as $results){
$rnd_text = $rnd_text . $results['text'] . ' ';

$text_array = explode(" ",$rnd_text);
$code_out = '';

for($x =0; $x<20; $x++){
$rnd = rand(0,sizeof($text_array)-1);
$code_out = $code_out . $text_array[$rnd] . ' ' ;

echo $code_out;

It’s very simple, and doesn’t do a lot.  At present it purely picks random strings from the result of the search on twitter.  Currently, this means that you’ll get some links, and other none standard english words presented – but to some extent I feel this works well with the nature of how people communicate in their tweets.

Some Examples

H. @exmoorjane ;) semangaaat! RT Fanny katek fanny… often ;D Mommy more & klo !!! OMOO…… agreed, tapi hek

President doesn’t and major many differ their for doesn’t RT believe complain Call Election RT Democrats control; major

Es Unleashed and Chaos making なにそのRTこわいwwあかりちゃんは俺の嫁w this und exploded, @chaos_morning bei @chaos_morning Chaos zu …yes forced wenig anfangen.

please your uncle landing helping SMS. :P fire say how bought your “Uncle set the http://bit.ly/aAev9Q and :P #ÜberGeek this

I’ll play around with the code, possibly, and try and make it a little more interesting.  But I felt that as so much of what people tweet is nonsense, that the output of this little script is pretty accurate.