View Single Post
Old 06-08-2005, 06:47 PM  
Ice
Confirmed User
 
Ice's Avatar
 
Join Date: Nov 2002
Location: Sunny California
Posts: 26,053
Quote:
Originally Posted by Donners
Yes, and it has one qoute per line.
hmmm I just set it up on my server and it works fine....

below is the code I used and an example of the quotes.txt file...

index.php

<html>
<head>
<title>Untitled</title>
</head>

<body>

<?
$quoteFile = "quotes.txt"; //File holding qoutes

$fp = fopen($quoteFile, "r"); //Opens file for read
$content = fread($fp, filesize($quoteFile));
$quotes = explode("\n",$content); //Put quotes into array
fclose($fp); //Close the file

srand((double)microtime()*1000000); // randomize
$index = (rand(1, sizeof($quotes)) - 1); //Pick random qoute

echo $quotes[$index]; //Print quote to screen
?>


</body>
</html>


quotes.txt

lick my balls
eat my ass
I like paste



link to working example of above...

http://www.pornfinders.com/quote/index.php
__________________
icq 1904905
Ice is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote