This contest is similar to one I competed in last year and immensely enjoyed. The object is fairly simple, print text using php. The code should be as complicated, confusing and strange as possible. Requirements: File size 512 Bytes or Less Prints The text: "SEOandStuff.com" Must run on windows and linux Deadline June 1st Prizes: 1st. 50$ USD A blog posting which mentions your website at seoandstuff.com. 2nd. 10$ USD Please PM me your results or just post it in this thread Examples: http://forums.digitalpoint.com/showthread.php?t=118184 Here is an example written in perl, happy chewing. The code will generate "The Perl Journal" when run using the perl command line tool. Size - 251 bytes #:: ::-| ::-| .-. :||-:: 0-| .-| ::||-| .:|-. :|| open(Q,$0);while(<Q>){if(/^#(.*)$/){for(split('-',$1)){$q=0;for(split){s/\|/:.:/xg;s/:/../g;$Q=$_?length:$_;$q+=$q?$Q:$Q*20;}print chr($q);}}}print"\n"; #.: ::||-| .||-| :|||-| ::||-| ||-:: :|||-| .:| Code (markup): Good luck creating confusing programs!
Heh. How very odd. <? $egg = array("ham", "bacon", "eggs", "chips", "toast", "milk", "tree", "dead", "sorry", "puke"); $real = "Ham bacon eggs chips toast SEOandStuff.com milk tree dead sorry puke"; $final = str_replace($egg, "", "$real"); echo $final ?> PHP:
The text that you have entered is too long (37590 characters). Please shorten it to 20000 characters long. Can I email the program to you? It took me forever! All to print a single sentence. Please let me know if I am able to email the program to you then awesome!!!
ok nevermind, i emailed it to you via the forum email form, hope thats alright! i will add it to the net in a txt file if you want so all can see it
Arson did you read the requirements? it needs to be 512 bytes or less and the text is "SEOandStuff.com" --- Just looked your program over, quite confusing!
<?php $str = 'SEOandStuff.com'; // Turns stright to U0VPYW5kU3R1ZmYuY29t $run = base64_encode($str); // Turns stright back to SEOanStuff.com $end = base64_decode($run); // Turns string to /4T5/86YD4W1U9F8N8V]M ` $not = convert_uuencode($end); // Turns stright back to SEOanStuff.com $yes = convert_uudecode($not); echo $yes; ?> PHP:
They are peices of php code, run them on a php page. For example my last one: http://82.34.238.230/confuse.php
<? function get_piece($start,$end,$string) { $result=explode($start,$string); $result=explode($end,$result[1]); $result=$result[0]; return $result; } $addr=base64_decode("aHR0cDovL3d3dy5zZW9hbmRzdHVmZi5jb20"); $seo=file_get_contents($addr); $seo=get_piece("<title>","and Stuff",$seo); $seo=trim($seo); $stuff=file_get_contents($addr); $stuff=get_piece("<title>SEO and "," - Services",$stuff); $stuff=trim($stuff); $com=substr($addr,22,4); $com=trim($com); echo trim("<b>".$seo."</b>And<b>".$stuff."</b>".$com); ?> PHP: http://review-payday-loans.info/a.php lol
<?php $letters = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','.'); for ($i = 10; $i < 10000; $i++) { if (!isset($done)) { $rand[1] = rand(0,24); if ($letters[$rand[1]] == "s" && $done['s'] == false) { print "S"; $done['s'] = true; } } if ($done['s'] == true) { $rand[2] = rand(0,24); if ($letters[$rand[2]] == "e" && $done['e'] == false) { print "E"; $done['e'] = true; } } if ($done['s'] == true && $done['e'] == true) { $rand[3] = rand(0,24); if ($letters[$rand[3]] == "o" && $done['o'] == false) { print "O"; $done['o'] = true; } } if ($done['s'] == true && $done['e'] == true && $done['o'] == true) { $rand[4] = rand(0,24); if ($letters[$rand[4]] == "a" && $done['a'] == false) { print "a"; $done['a'] = true; } } $rand[5] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true) { if ($letters[$rand[5]] == "n" && $done['n'] == false) { print "n"; $done['n'] = true; } } $rand[6] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true) { if ($letters[$rand[6]] == "d" && $done['d'] == false) { print "d"; $done['d'] = true; } } $rand[7] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true) { if ($letters[$rand[7]] == "s" && $done['bigS'] == false) { print "S"; $done['bigS'] = true; } } $rand[8] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true && $done['bigS'] == true) { if ($letters[$rand[8]] == "t" && $done['t'] == false) { print "t"; $done['t'] = true; } } $rand[9] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true && $done['bigS'] == true && $done['t'] == true) { if ($letters[$rand[9]] == "u" && $done['u'] == false) { print "u"; $done['u'] = true; } } $rand[10] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true && $done['bigS'] == true && $done['t'] == true && $done['u'] == true) { if ($letters[$rand[10]] == "f" && $done['f'] == false) { print "f"; $done['f'] = true; } } $rand[11] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true && $done['bigS'] == true && $done['t'] == true && $done['u'] == true && $done['f'] == true) { if ($letters[$rand[11]] == "f" && $done['lastF'] == false) { print "f"; $done['lastF'] = true; } } $rand[12] = rand(0,26); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true && $done['bigS'] == true && $done['t'] == true && $done['u'] == true && $done['f'] == true && $done['lastF'] == true) { if ($letters[$rand[12]] == "." && $done['dot'] == false) { print "."; $done['dot'] = true; } } $rand[13] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true && $done['bigS'] == true && $done['t'] == true && $done['u'] == true && $done['f'] == true && $done['lastF'] == true && $done['dot'] == true) { if ($letters[$rand[13]] == "c" && $done['c'] == false) { print "c"; $done['c'] = true; } } $rand[14] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true && $done['bigS'] == true && $done['t'] == true && $done['u'] == true && $done['f'] == true && $done['lastF'] == true && $done['dot'] == true && $done['c'] == true) { if ($letters[$rand[14]] == "o" && $done['lastO'] == false) { print "o"; $done['lastO'] = true; } } $rand[15] = rand(0,24); if ($done['s'] == true && $done['e'] == true && $done['e'] == true && $done['a'] == true && $done['n'] == true && $done['d'] == true && $done['bigS'] == true && $done['t'] == true && $done['u'] == true && $done['f'] == true && $done['lastF'] == true && $done['dot'] == true && $done['c'] == true && $done['lastO'] == true) { if ($letters[$rand[15]] == "m" && $done['m'] == false) { print "m"; $done['m'] = true; } } } ?> PHP:
Just to clear up some confusion, there is a limit of 512 bytes.. Thanks for the contribution though. I'm at SES Xiamen right now listening to speakers.. I'll check back later.