![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2005
Posts: 8
Rep Power: 0
![]() |
Quote Database
how would you go about doing one? with + and - value increaser like on bash.org
#quote number + - del QUOTE HERE like that, and how to do a top 100, random without using mysql. |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Why can't you use MySQL or some other database? It'll make it soooooooooooo much easier.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2005
Posts: 8
Rep Power: 0
![]() |
my host does not have it.
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0
![]() |
which database does your host allow?
__________________
Don't wound what you can't kill |
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
In that case, I suggest getting a host which does. If that's not an option, you can have a PHP file with an array of quotes, and use the rand() function to pick them randomly.
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() |
Put them all in a file, putting each quote on a new line...
[php] function getQuote($file) { $file = implode("", file($file)); $file = explode("\n", $file); $quoteNum = rand(0, count($file) -1); return array("number" = >$quoteNum + 1, "quote" => $file[$quoteNum]); } [/php] Example usage: [php] $newQuote = getQuote("yourQuotesFile.txt"); echo "Quote #{$newQuote['number']}:<br>\n"; echo "<ul>"; echo $newQuote["quote"]; echo "</ul>"; [/php]
__________________
Last edited by tempest; Feb 23rd, 2005 at 1:04 PM. |
|
|
|
|
|
#7 |
|
Newbie
Join Date: Feb 2005
Posts: 8
Rep Power: 0
![]() |
my host sucks, no mysql, and I don't really feel like changing.
waht I really need to know is how to do a top 100 and make the + and - and x work. |
|
|
|
|
|
#8 |
|
Expert Programmer
|
You probably need to get a new host, might I suggest http://www.crd-hosting.com - they have mySQL and PHP support and plenty of other goodies at very affordable prices
![]()
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#9 | |
|
Hobbyist Programmer
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0
![]() |
Quote:
![]() My President sucks, no intelligence, and I don't really feel like changing. ![]()
__________________
Don't wound what you can't kill |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|