Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-01-2006, 10:52 PM   #1
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Anyone know of a program that will take a text file and randomize the lines?

I have a huge list of urls, and I need them to be in random order...I have text pad, but that only sorts by letter and shit, and I need everything to randomize

is randomize even a word?
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:16 PM   #2
Quickdraw
Confirmed User
 
Join Date: Mar 2004
Location: → → →
Posts: 1,717
If you can use PHP, here is quick dirty way to do it

PHP Code:
<?php
$file 
file("urls.txt");

// Strips dupes if you need, comment out if you do not need this
$temp array_unique($file);

//Shuffles the deck or randomizes :)
shuffle($temp);
//Prints each line 
foreach($temp as $value)
   {
   echo 
$value;
   }
exit;
?>
Quickdraw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:19 PM   #3
BIGTYMER
Junior Achiever
 
BIGTYMER's Avatar
 
Industry Role:
Join Date: Nov 2004
Location: Walled Garden
Posts: 17,066
Quote:
Originally Posted by Quickdraw
If you can use PHP, here is quick dirty way to do it

PHP Code:
<?php
$file 
file("urls.txt");

// Strips dupes if you need, comment out if you do not need this
$temp array_unique($file);

//Shuffles the deck or randomizes :)
shuffle($temp);
//Prints each line 
foreach($temp as $value)
   {
   echo 
$value;
   }
exit;
?>
Cool little script. Thanks!
BIGTYMER is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:21 PM   #4
StickyGreen
.
 
StickyGreen's Avatar
 
Industry Role:
Join Date: Oct 2003
Posts: 13,076
gracias...
StickyGreen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:22 PM   #5
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally Posted by Quickdraw
If you can use PHP, here is quick dirty way to do it

PHP Code:
<?php
$file 
file("urls.txt");

// Strips dupes if you need, comment out if you do not need this
$temp array_unique($file);

//Shuffles the deck or randomizes :)
shuffle($temp);
//Prints each line 
foreach($temp as $value)
   {
   echo 
$value;
   }
exit;
?>
i did that and it output everything as one single line...LOL

worked great from what I can tell, but here is what it did


http://www.constantbabes.com/tmp/urls.php
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:25 PM   #6
mikeyddddd
Viva la vulva!
 
mikeyddddd's Avatar
 
Join Date: Mar 2003
Location: you can't please everyone, so you got to please yourself
Posts: 16,557
Put a <br> on each line or change the script

From this:

echo $value;

to this:

echo "<br>$value";

or echo "$value<br>";
mikeyddddd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:26 PM   #7
Quickdraw
Confirmed User
 
Join Date: Mar 2004
Location: → → →
Posts: 1,717
Quote:
Originally Posted by Jace
i did that and it output everything as one single line...LOL

worked great from what I can tell, but here is what it did


http://www.constantbabes.com/tmp/urls.php
oh sorry--
You can save that page as a text file, or view source and it will be line by line
Quickdraw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:29 PM   #8
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally Posted by mikeyddddd
Put a <br> on each line or change the script

From this:

echo $value;

to this:

echo "<br>$value";

or echo "$value<br>";
PERFECT!
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:30 PM   #9
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally Posted by Quickdraw
oh sorry--
You can save that page as a text file, or view source and it will be line by line
I just added a BR to the end of each line and it worked fine

didn't think of saving it

regardless, it worked perfect
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:44 PM   #10
Quickdraw
Confirmed User
 
Join Date: Mar 2004
Location: → → →
Posts: 1,717
Cool, glad it did what you needed.
And yes, randomizes is a real word.
http://www.thefreedictionary.com/randomize
Quickdraw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2006, 11:58 PM   #11
potter
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
You can also use open office. Paste all the items into a spreadsheet, then paste the random number char code into the column next to the urls, then sort by numbered column, copy the column with the urls and you're done.
__________________

potter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.