| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Mar 2006
Posts: 887
![]() ![]() ![]() | random generator 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! |
| |
| | #2 (permalink) |
| Senior Member ![]() ![]() Join Date: Apr 2005 Location: .ma.us
Posts: 1,880
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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 by droplister; 03-20-2006 at 06:52 PM.
|
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Mar 2006
Posts: 887
![]() ![]() ![]() | 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 by Something Vague; 03-20-2006 at 06:05 PM.
|
| |
| | #6 (permalink) |
| NamePros Regular Join Date: Aug 2005 Location: NY, USA
Posts: 610
![]() ![]() ![]() ![]() ![]() ![]() | 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> PHP Code:
__________________ ask me about the internet |
| |