NameSilo

Random generator

SpaceshipSpaceship
Watch

Something Vague

Established Member
Impact
9
http://www.insultmonger.com/generators/index.htm

can anyone create a script similar to that process? the ability to push a button, and it randomly displays a line of words from a database. If someone can PM me a script of this, or code it, they're a great person, and I would be glad to give rep points, maybe some NP. :)

I really need a script like this!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
try something like this, i use it for a random domain generator

the text file consists of one entry per line

<?
//Text files to use
$textfile ="http://www.droplister.com/dom_list1.txt";

//Let's randomize these words
$rand = file("$textfile");
$rando = rand(0, sizeof($rand)-1);

?>
<a class="reload" href="javascript: window.location.reload()"><img src="Your Button"></a> for another.
<textarea>
<?
//Print the random name
echo $rand[$rando];
?>
</textarea>
 
Last edited:
0
•••
Hi,

Look at the quick reply box here at namepros. Image that "message;" says "Word Generator" and the box where you type the message displays "random text here". Then if I hit a button like "Post Quick Reply" it displays another "random text here" without loading the entire page again. Just the text in the box changes.

DO you know what I mean? Can you edit your script to suit said needs? I really like how it picks from a text list! Fantastic!
 
Last edited:
0
•••
The script is loaded inside an iframe on that page. The go button just reloads the page inside the iframe.
 
0
•••
Can anyone integrate this script where the random results are in a text box, and the reload action is an image (like a .gif saying GO!, not button)?
 
0
•••
page:
Code:
<a href="script.php" target="_box"><img src="go.gif" /></a>
<iframe name="_box" src="script.php" width="400" height="50" frameborder="0"></iframe>

script.php:
PHP:
<?php
$textfile ="http://www.droplister.com/dom_list1.txt";

$rand = file("$textfile");
$rando = rand(0, sizeof($rand)-1);

echo $rand[$rando];
?>
 
0
•••
Wicked, thank you Jim. Rep added! :)
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back