LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-04-2005, 09:56 PM   #1
feetyouwell
Member
 
Registered: Dec 2003
Location: NC, US
Distribution: Novell Linux Eval (2.6.5)
Posts: 240

Rep: Reputation: 30
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 ?
 
Old 01-05-2005, 01:33 AM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
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>";
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
the adverts on LQ homepage ylawayjdp LQ Suggestions & Feedback 1 03-24-2005 03:29 PM
LQ icon for my homepage resnak Linux - General 2 02-21-2004 09:54 PM
player/plugin for nsv (nullsoft streaming video) jmr71769 Linux - Software 0 02-19-2004 01:55 PM
why is my homepage changing? ChasidishHarry General 5 12-14-2003 04:02 PM
homepage zpyoung Linux - Networking 4 05-19-2001 04:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration