LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   nullsoft homepage (https://www.linuxquestions.org/questions/programming-9/nullsoft-homepage-273959/)

feetyouwell 01-04-2005 09:56 PM

nullsoft homepage
 
for anyone who's been to nullsoft.com (winamp creator), its homepage create a background of random generated hex decimals, then use while text on the top, it's really interesting, i think it's generated by php, i am new to php, i guess it could be as simple as

Code:


for (1 to ? number)
    $value = rand(1, 15);
    switch($value)
    case (1):
        echo "1";
          ....
          ....
end for


does anyone has actually done it and give me some direction of how to do it ?

CroMagnon 01-05-2005 01:33 AM

Code:

$NUMLINES=20;
$NUMROWS=40;      //  Actually the number of hexadecimal pairs
for ($line=0; $line < $NUMLINES; $line++) {
  for ($char=0; $char < $NUMROWS; $char++) {
    // Change colour here
    echo dechex( mt_rand( 0, 15 ) );
    echo dechex( mt_rand( 0, 15 ) );
  }
  echo "<br>";
}



All times are GMT -5. The time now is 06:03 PM.