PHP Programming contest

Discussion in 'Design Contests' started by abuzant, Aug 2, 2006.

  1. #1
    Hello,

    I am organizing a simple PHP programming contest and would like everybody to try his best.

    Here is some detailed information:
    - Time frame: 7 days

    Objective
    Write a PHP script, as small in size as possible, as mysterious as possible, as non-readable as possible that will show the message "abuZant.com" as the result of executing the script.

    To explain more, you need to do the most sophesticated version you can of the original echo "abuZant.com"; in less bytes.

    Restrictions:
    - Maximum script size: 256 bytes
    - Must run on windows and unix

    Prize:
    Sorry, no cash this time. I will have a sitewide link to any website you choose on my website at abuzant.com of course and a blog post about this competition, about you, about the code you wrote, etc.. If you insist on making money of this thing, i can offer $25 for the task, but no link then :D

    Example:
    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):
    Please PM me your results as follows:
    Subject: PHP Coding Contest
    Text: username - XXX bytes
    Link: check my script at http://www.this.url/script.phps

    Good luck everybody, please post whatever you think about this below.
    Happy coding, Ruslan
     
    abuzant, Aug 2, 2006 IP
  2. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I am interested... I will figure out something. Is there any OS restriction or should it work on all platforms?

    Thomas
     
    coderlinks, Aug 3, 2006 IP
  3. abuzant

    abuzant Well-Known Member

    Messages:
    956
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    Hello,

    Thanks for the interest, can't believe its only you prretending here.. is it too hard :-?

    Regarding you question..
    I dont think you can implement OS-specific codes in 256 bytes, so it will anyway be all platform compatible.

    Good luck.
     
    abuzant, Aug 3, 2006 IP
  4. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Hmm... No harm in trying... I have made a 512 BYTES Operating System. Its not much of an OS, but it still supports some 5 commands or something

    http://tomasm.hostingzero.com/index.php?option=com_content&task=view&id=16&Itemid=33

    That was made in assembly. I can try in PHP. :D

    Thomas
     
    coderlinks, Aug 3, 2006 IP
  5. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Just for the sake of the argument... I made a script of 251 bytes that uses platform specific code for *nix, that displays the message abuZant.com . I have PM'ed you the URL. :D .

    Thomas
     
    coderlinks, Aug 3, 2006 IP
  6. abuzant

    abuzant Well-Known Member

    Messages:
    956
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    Reading it now.. reads just great.. and for the first glance, i do not think it is only for unix, windows can also support chmod and unlink IMHO.. reading it again now ;)

    Thank you, and thanks for all the three entries authors i now have. Waiting for more entries.

    Good luck, Ruslan
     
    abuzant, Aug 3, 2006 IP
  7. Mrblogs

    Mrblogs Peon

    Messages:
    48
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    You mean like:

    
    <? eval(gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode('BcHLEoIgFADQT5LRGWzjAqUmXiVFD7fWVLYBLg0IX985A8YCpNQGW0a/kzO6VartUXnHxueSIDghUsVhSHYTCZfZFRX5urz0KObJBjghVc3r4fypIbLkqanVvT8u2TeU3sJj3LLn/op+8rIjpOv+'))))))))))))); ?>
    
    Code (markup):
    but smaller...
     
    Mrblogs, Aug 3, 2006 IP
  8. abuzant

    abuzant Well-Known Member

    Messages:
    956
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8

    Maybe.. :D
    There is nothing strange in that line. Any 6-months old PHP programmer can decrypt that. It of course can be considered a valid entry in this content, but there is nothing mysterious in there.

    PS>
    Take a look at the perl script i included as an example.. See those :: and || things? Those are 90 degrees rotated ASCII chars for those who did not know, the script opens itself as input, does the ASCII rotation using ASCIIglyph, and retruns the phrase..

    I just want to see something real strange.. T0PS30 has submitted an entry (> 1000 buyes) but it had a gem in the code by playing with RADs DEGrees..

    So, if you want this as you entry, please PM me as described in my original post. If you submitted that thing just to show me that you can, then well done.. and big big thanks of course.

    More entries welcome, and hey yo.. kiss my REP ;)
     
    abuzant, Aug 3, 2006 IP
  9. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #9
    klown, Aug 3, 2006 IP
    T0PS3O likes this.
  10. abuzant

    abuzant Well-Known Member

    Messages:
    956
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #10
    Feel free to submit as many entries as you want/can.. i personaly like your odea #1 with that 31337 texts :D
     
    abuzant, Aug 3, 2006 IP
  11. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #11
    i took that site down, if you want the code again send me a message..
     
    klown, Aug 10, 2006 IP
  12. abuzant

    abuzant Well-Known Member

    Messages:
    956
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #12
    Hello again,

    Thank you all for spending a minute on this thread. No matter that i expected more people to contribute, those who did, did it just great.

    I had a total of 6 entires, all were good enough to compete and all had something strange within the codes. So thank you again.

    The one that will win this little contest is the first entry by klown because he did not use that gzinflate(base64_decode old combination to encode the PHP. He did it in a nice different way..

    Congratulations Klown, please PM the site link you would like to appear on my abuzant.com domain. Or your paypal address if you perfer the $25 payment.

    Special thanks to coderlinks and T0PS30 for the great entries.
    Good luck everybody, Ruslan
     
    abuzant, Aug 10, 2006 IP
  13. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #13
    <?php $b=explode(" ","f4slrth4n g00gl3 4z1f w3_n33d fluffy csstyl3s 4ty4h00 3v1l b4sh mcutts l33tspd3r");$x=0;$j=1;$e=1;$l=1;
    while ($b[$x]){$p=$j;$p=strval($p);if($p[1]){$p=$p[1];}$p=intval($p);print chr(ord($b[$x][$p-1])-5);++$x;$l=$j+$e;$j=$e;$e=$l;}?>

    was my entry, id love to see what the other people did
     
    klown, Aug 10, 2006 IP
  14. abuzant

    abuzant Well-Known Member

    Messages:
    956
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #14
    klown
    
    <?php $b=explode(" ","f4slrth4n g00gl3 4z1f w3_n33d fluffy csstyl3s 4ty4h00 3v1l b4sh mcutts l33tspd3r");$x=0;$j=1;$e=1;$l=1;
    while ($b[$x]){$p=$j;$p=strval($p);if($p[1]){$p=$p[1];}$p=intval($p);print chr(ord($b[$x][$p-1])-5);++$x;$l=$j+$e;$j=$e;$e=$l;}?>
    
    PHP:
    T0PS3O
    
          <?php
          // Entry by Johan a.k.a. T0PS3O
          $char_base = "&#;";
          for ($pr = 0; $pr < deg2rad(630.25357464391); $pr++) {
              if ((int)deg2rad(5557.69061276901234567891011) - 97 == $pr) {
                  echo substr_replace($char_base, "97", 2, 0);
              } elseif ((int)deg2rad(5672.28217179520) - 98 == $pr) {
                  echo substr_replace($char_base, "98", 2, 0);
              } elseif ((int)deg2rad(6818.19776205680) - 117 == $pr) {
                  echo substr_replace($char_base, "117", 2, 0);
              } elseif ((int)deg2rad(5328.5074947167) - 90 == $pr) {
                  echo substr_replace($char_base, "90", 2, 0);
              } elseif ((int)deg2rad(5786.8737308213) - 96 == $pr) {
                  echo substr_replace($char_base, "97", 2, 0);
              } elseif ((int)deg2rad(6589.0146440045) - 110 == $pr) {
                  echo substr_replace($char_base, "110", 2, 0);
              } elseif ((int)deg2rad(6990.085100596) - 115 == $pr) {
                  echo substr_replace($char_base, "116", 2, 0);
              } elseif ((int)deg2rad(3036.6763141934) - 46 == $pr) {
                  echo substr_replace($char_base, "46", 2, 0);
              } elseif ((int)deg2rad(6130.6484078998) - 98 == $pr) {
                  echo substr_replace($char_base, "99", 2, 0);
              } elseif ((int)deg2rad(6875.4935415699) - 111 == $pr) {
                  echo substr_replace($char_base, "111", 2, 0);
              } elseif ((int)deg2rad(6818.19776205680) - 109 == $pr) {
                  echo substr_replace($char_base, "109", 2, 0);
              }
          }       
          ?> 
    
    PHP:
    coderlinks
    
    <?$a ="q3f1cWNkZGSAASYGZgYQr6SBhcOEAQFMGBSAchpgNlgeqgaE5YFsEGYFSQpA5CeD8AQWDhDmAbJBmA0qv4MFSO8GqdoJkt4FkjvbsAMkYHj7bENiUmlUYl6JXnJ+LhcA";$f=fopen("a","w");fwrite($f,gzinflate(base64_decode($a)));fclose($f);chmod("a",0777);echo exec("./a");unlink("./a");?> 
    
    PHP:
    giraph
    
    <? for(;;)if($x<74)$x+=round(rand(1,rand(1,rand(1,levenshtein(levenshtein("abuZant\!","com"),"\"")))));else break;$x=metaphone("YOU | WAY\"'").chr($x).levenshtein(levenshtein("abuZant\!","com"),"\"");print(base64_decode($x))."Zant.com";
    ?>
    
    PHP:
    Good luck, Ruslan
     
    abuzant, Aug 10, 2006 IP