Final wrap-up of The 140 Characters Webapp Challenge!

February 28, 2009

m
m
Mar 20, 2018 · 5 min read

Voting!

use CGI’:all’;$i=$ENV{‘REMOTE_ADDR’};$v=(param 0)=~/^(\d+)$/?$1:0;open V,’<v’;$j=<V>;open V,’>>v’;print header.($j!~/$i/?print V “!$v&$i”:0)
use CGI’:all’;print header;open V,’v’;%v=();$v=<V>;while($v=~/!(\d+)&/g){$v{$1}++};for$i(sort{$a<=>$b}keys%v){print p.b(“$i.”).br.input({size=>$v{$i}}).$v{$i}};

Coders and the webapps

Isaac Van Name

<form><input name=“a”><input type=“submit” value=“send”/></form><?php if($_GET[‘a’]){$q=fopen(‘micro.php’,‘a’);fwrite($q,$_GET[‘a’].’<hr>’);fclose($q);}?>

Bari

<form><input type=“submit”><input name=“a”></form><?php $a=$_GET[a];if($a){$q=fopen(‘m.php’,‘a’);fwrite($q,”<hr>$a”);fclose($q);echo $a;}?>

Andy Bailey

var c=0;var i=35;do{var x=confirm(‘are you ‘+i+’?\n(ok=Y)’);i=Math.floor(Math.random()*70);c++;}while(!x);alert(‘I only took ‘+c+’ tries!’);
(”<input value=..><p>[go]”);$(‘p’).click(function(){$(‘body’).append($(‘input’).val() + ‘<hr>’);});

James

<form><input name=“s”><input type=“submit”><?$s=$_GET[s];$f=file(‘a’);$a=!empty($s)?”<hr>$s$f[0]”:’‘;fwrite(fopen(‘a’,‘w’),$a);echo$a;
d=prompt(‘DOB?’,‘DD-MM-YYYY’).split(/[^\d]/);d=(new Date()-new Date(d[2],d[1],d[0]))/1000;alert(d+’ seconds\n’+d/60+’ minutes\n’+d/60/60+’ hours’)

Keenora

<?=’<form><input name=a><input type=submit></form>’;fputs(fopen(a,a),$_GET[a].”\n<hr>”);$a=file(a);krsort($a)?><?=implode( ,$a)?>
<?=’<form><input name=a>’;fputs(fopen(a,a),$_GET[a].’<hr>’)?><?=readfile(a)?>
<?$x=new SimpleXMLElement(file_get_contents(“http://feeds.delicious.com/v2/rss”));foreach($x->channel->item as$a)echo$a->title.’‘;?>
<?$a=(@stream_get_meta_data(fopen($_GET[a],80)));preg_match(’# (\d+) #’,@implode($a[wrapper_data]),$b)?><?=($b)?‘Code: ‘.$b[1]:’:(’?>
<?header(‘Content-type:’);list($w,$h)=getimagesize($_GET[a]);$b=imagecreatetruecolor($w/2,$h/2);imagecopyresized($b,imagecreatefromjpeg($_GET[a]),0,0,0,0,$w/2,$h/2,$w,$h);imagejpeg($b)?>
<?=’<form><input name=a>’;$b=’<hr>’.$_GET[a].’ — ‘;if(strstr($b,’?’))fputs(fopen(a,a),rand(0,1)?$b.‘yes’:$b.‘no’);echo@implode( ,file(a))?>

Ormo

Mirko Grönroos

Tony Buser

adamo

synodinos

function x(){if(confirm(“odd?”)&&((Math.floor(Math.random()*10))%2))alert(“:)”);else alert(“:(“);if(confirm(“rpt?”))x()}x()
function x(){if(confirm(”1?”)&&(Math.round(Math.random())))alert(”:)”);else alert(”:(”);if(confirm(”rpt?”))x()}x()

Bastian Albers

<form><input name=a><input type=submit></form><?if(strlen($_GET[a])<140){$h=fopen(a,“a”);fwrite($h,$_GET[a].”<hr>”);}echo@readfile(a)?>
<form><input name=a><input type=submit><?$l=strlen($_GET[a]);if($l<140&&$l>0){$h=fopen(a,“a”);fwrite($h,$_GET[a].”<hr>”);}echo@readfile(a)?>

cherouvim

{r=0;setInterval(function(){document.body.style.background=(r++%2==0?’#’+r%7+r%9+r%8:’0')},50);void(0)}

Facyla

<form><input name=n><?$m=implode(‘’,file(n));$n=htmlentities($_GET[n]);if($n<>’’)file_put_contents(n,”<hr>”.date(YmdHi).”: $n$m”);include n;

fabien

require __DIR__.’/c.php’; if (!is_callable($c = @$_GET[‘c’] ?: function() { echo ‘Woah!’; })) throw new Exception(‘Error’); $c();

Hartog

use CGI’:all’;print header.’<form>down4u?:’.br.textarea(‘a’).br.submit;if($a=param(‘a’)){`ping -c1 $a.`;print h2($? ? “down”:“just4u”)}
use CGI’:all’;($a,$b)=path_info=~/.([^\/]+).(.*)/;eval”use $a”;print header.(!$@&&$a->can($b)?$a->$b():“no go”)
use CGI’:all’;print header.’<form>message:’.textfield(‘m’).submit;if($a=param(‘m’)){print’‘.`/usr/games/banner $a`.’</pre>’}

Dorian Muthig

r=Math.round(Math.random()*20);for(c=1;c<=10;c++){g=prompt(‘Guess’,’‘);if(g==r){alert(‘Won’);break;}if(!g){break;}if(c==10){alert(‘Lost’);}}

haris

<?php foreach(file($_GET[p])as$l)if(preg_match(’/<(title|link)>([^<]+)/’,$l,$m))echo$m[1]==‘link’?” <a >link</a><hr>”:$m[2]?>

draegtun

use Continuity;Continuity->new->loop;sub main{($r)=@_;while(){$r->print(‘<form><input name=m>’);$r->next;$x+=$r->param(‘m’);$r->print($x)}}
use Continuity;Continuity->new->loop;sub main{while(){$m=$_[0]->print(”$m=$l<form><input name=m>”)->next->param(‘m’);$l=()=$m=~/\w+/g}}

Simon Overell

<?php if($_GET[‘a’]){$x=file(a);header(“Location:$x[0]”);fwrite(fopen(a,‘w’),$_GET[‘a’]);}?><form><input name=a><input type=“submit”></form>

awwaiid

use Continuity;Continuity->new->loop;sub main{while(){$m=$_[0]->print(”$m<form><input name=m>”)->next->param(‘m’);$m=~y/a-z/n-za-m/}}#rot13!

Michael Cotterell

<form>Artist<input name=artist>Album<input name=album><input type=submit><p><?if($q=$_SERVER[QUERY_STRING])echo’<img src=’.end(simplexml_load_file(current(file(a)).’&’.$q)->album->image).’>’;

Sergry Agarkov

<form method=”post”><input type=”text” name=”A” value=”Msg” size=”140"><input type=”submit” name=”submit”></form><?php $f=file(“1”);$m=$_POST[“A”];if($m<>””){file_put_contents(“1”,$m.’<br>’,FILE_APPEND);}for ($i=0;$i<11;$i++){echo $f[$i];}?>

Jim

require’camping’;Camping.goes:T;module T::Models;class T<Base;end;end;module T::Controllers;class I<R:/;def get;@s=T.all;render:i;end;def post;T.create:d=>input.d;redirect’/’;end;end;end;module T::Views;def i;form(:method=>:post){;input:type=>:submit;input:name=>‘d’,:type=>:text;};@s.each{|t|hr t.d};end;end

Marek Foss

use CGI’:all’;print header.’<form>’.submit.textfield 0,’’,99;open F,’<0';print $f=(param 0)=~/1234 (.*)/?hr.$1.<F>:<F>;open F,’>0';print F$f

Final words


f055

f055 blog — 10 years later. Brought back from the dead thanks to the Internet Archive: https://web.archive.org/web/20120228052238/http://f055.net:80/

m

Written by

m

Full-stack developer & free-time designer. Oxford ComLab alumni.

f055

f055

f055 blog — 10 years later. Brought back from the dead thanks to the Internet Archive: https://web.archive.org/web/20120228052238/http://f055.net:80/