GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Is there a tool that ... (https://gfy.com/showthread.php?t=406027)

Toni 12-21-2004 12:56 AM

Is there a tool that ...
 
Is there a tool that can mix/reorder lines of text into a different/random order, for example, I enter:

URL A
URL B
URL C
URL D
URL E
URL F
etc.

Output:
URL C
URL F
URL E
URL A
URL D
URL B
etc.

Is there a program that can do that with hundreds or thousand lines of text/URL's ?

chase 12-21-2004 01:00 AM

couldn't Excel do some random order thing?
(I don't know shit about it, but I wondered that before myself.)

Trixxxia 12-21-2004 01:07 AM

Personally - I would do it with excel - say number 1 to 100 on another column - copy and past it throughout the column until the end of your list - then take both columns and Data Sort by the numbered column - every hundred urls will be following the order

emthree 12-21-2004 01:18 AM

You know ... I needed to have that done a couple of years back, but I cannot remember why. :helpme

But anyway, how many lines are you looking to have mixed? What's the purpose?

Toni 12-21-2004 01:26 AM

Quote:

Originally posted by emthree
You know ... I needed to have that done a couple of years back, but I cannot remember why. :helpme

But anyway, how many lines are you looking to have mixed? What's the purpose?

It is a list of free hosted galleries of various sponsors that should be included in our TGP?s. For example we have 500 Category A galleries of 10 sponsors I want to mix that list so the script doesn?t show first all galleries of one sponsor, then the next etc. It can be done by hand but it takes extremely long for 20k+ galleries.

Toni 12-21-2004 01:34 AM

I just found something that works for anybody interested:
http://www.bykeyword.com/downloads/s...load-8134.html

The only thing that sucks is that the export list creates a empty row between each text line.

Toni 12-21-2004 01:53 AM

With Text Pipe I removed the blank lines and I have a perfect list!

Should be a big help for other tgp owners too!

NastyJack 12-21-2004 02:43 AM

place this in the same dir as the file you want to shuffle and change $textfile to the filename of the list.

shuffle.php

PHP Code:

<?php

$textfile 
"urls.txt";

$data file($textfile);

shuffle($data);
shuffle($data);
shuffle($data);

$fp fopen($textfile"w+");
foreach(
$data as $line) {
  
fwrite($fptrim($data) . "\r\n");
}
fclose($fp);

?>


SilverTab 12-21-2004 02:46 AM

Quote:

Originally posted by chase
couldn't Excel do some random order thing?
(I don't know shit about it, but I wondered that before myself.)

excel would probably do it, but if I remember well, the max number of rows for an exel sheet is the size of an integer (65535 )

ytcracker 12-21-2004 02:47 AM

Quote:

Originally posted by NastyJack
place this in the same dir as the file you want to shuffle and change $textfile to the filename of the list.

shuffle.php

PHP Code:

<?php

$textfile 
"urls.txt";

$data file($textfile);

shuffle($data);
shuffle($data);
shuffle($data);

$fp fopen($textfile"w+");
foreach(
$data as $line) {
  
fwrite($fptrim($data) . "\r\n");
}
fclose($fp);

?>


haha123 should be left squiggle bracket

NastyJack 12-21-2004 02:49 AM

Quote:

Originally posted by ytcracker
haha123 should be left squiggle bracket
yes it should be, thanks for pointing that out. i was too lazy to edit the thread to say that.:thumbsup

PHPdude 12-21-2004 03:05 AM

Man couldnt you have writen that yourself.


All times are GMT -7. The time now is 12:28 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123