Recent Changes - Search:

aohavkbs, http://www.tomshw.it/forum/members/buy-glucophage.html glucophage conveniente, tndgogaw, http://www.tomshw.it/forum/members/comprar-zyprexa.html zyprexa conveniente, vtyyhpgn, http://www.tomshw.it/forum/members/comprar-desyrel.html desyrel conveniente, fxjgwxxe, http://www.tomshw.it/forum/members/comprar-cytotec.html cytotec prezzo ridotto, sazxpbxj,

Assignment1Mike

Sample output:
-!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-
! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-
%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- 
!-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!
- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!
-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! 
-!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-
! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-
%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- 
!-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!
- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!
-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! 
-!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-
! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-
%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- 
!-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!
- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!
-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! 
-!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-
! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-
%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- 
!-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!- !-%-! -!-!

Source code:

<?php

fwrite(STDOUT, "\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n   Welcome to the\n   QUASI-INIFINITE WALLPAPER MAKER,\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n   Please type a single letter (a-z): ");
$letter = trim(fgets(STDIN));

while (!preg_match("/^[a-z]{1}$/i", $letter)) {
   fwrite(STDOUT, "   Try again jackass. We need one letter from a to z: ");
        $letter = trim(fgets(STDIN));
}

fwrite(STDOUT, "   Good choice, now type a number: ");
$number = trim(fgets(STDIN));

while (!preg_match("/^\d+$/", $number)) {
        fwrite(STDOUT, "   NEIN!. We need a number: ");
        $number = trim(fgets(STDIN));
}
settype($number, 'integer');

echo "\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\nAs you wish. You typed: $letter $number.\n\n";

//----------------------------------------------------------

$alphabet = array("void","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($index = 0; $index < count($alphabet); $index++) {
        if($alphabet[$index] == $letter) {
                $cipher = $index*3000;
        }
}

$digits = array();
$brick = array();
$pattern = array('- - ', '-!-!- ', '!-%-! ', '%_&_% ', '*-$-* ', '$!$! ', '@_##_@ ', '-@*&#&*@- ', '#@@#!#@@# ', '##%$#$%## ');

$str = $number;
$chars = preg_split('//', $number, -1, PREG_SPLIT_NO_EMPTY);

foreach ($chars as $n){
        settype($n, 'integer');
        array_push($digits, $n);
}

foreach ($digits as $d) {
        array_push($brick, $pattern[$d]);
}

$master = implode ("", $brick);
echo $master;

for ($i = 0; $i < $cipher; $i++) {
        echo $master;
}       

echo "\n\n\nKeep on truckin, there's more patterns to be found.\nThank you for your time.\n\n\n";


?>
 

Edit - History - Print - Recent Changes - Search
Page last modified on February 12, 2006, at 04:42 PM