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 11-15-2006, 08:01 PM   #1
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
I want to switch out one url on 500 html pages with multiple urls at random, can I?

I have about 500 html pages, they all have the same url throughout them

I have list of alternate urls that I want that one url switched out for, at random

so, every html page will have different links, but keeping within the 10 or so links that I provide...and all random

is there a script or software that can do that?
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:11 PM   #2
StarkReality
Confirmed User
 
StarkReality's Avatar
 
Join Date: May 2004
Location: 4 8 15 16 23 42
Posts: 4,444
Useful File Utilities from http://www.replsoft.com/ is good for batch replacing in html files, but you'd need to put the files in 10 directories/50 files each since it has no randomizing function...but still less work than doing it one by one.
StarkReality is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:15 PM   #3
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally Posted by StarkReality View Post
Useful File Utilities from http://www.replsoft.com/ is good for batch replacing in html files, but you'd need to put the files in 10 directories/50 files each since it has no randomizing function...but still less work than doing it one by one.
what if the url that i want replaced is at 20 times in one html document, can I set it to put my 10 urls at random in that one html page?
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:17 PM   #4
marketsmart
HOMICIDAL TROLL KILLER
 
Industry Role:
Join Date: Dec 2004
Location: Sunnybrook Institution for the Criminally Insane
Posts: 20,419
im not sure, but heres a bump
marketsmart is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:24 PM   #5
r-c-e
Confirmed User
 
Join Date: Jul 2002
Posts: 1,070
Perhaps a perl or php script might help.
r-c-e is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:25 PM   #6
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
write a random function

$file = "urls.txt";
$fp = file($file);
srand((double)microtime()*1000000);
$urls = $fp[array_rand($fp)];
echo $urls;

could do that and call it from

<a href="<?include "random.php"?>">

and if they must be .html pages you could add to .htaccess

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .inc

dont know if thats what you are looking for or not
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:25 PM   #7
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
i just did this recently for someone. i'm a but busy tonight but keep in touch and i can help you out if you dont find anything
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:27 PM   #8
GooSearch
Confirmed User
 
Join Date: Oct 2006
Location: FLA
Posts: 2,538
have you tried dreamweavers find and replace..i have done 230 pages.. nothign random though sry
__________________
GooSearch Real Text Ads Without The Drama
Coming Back Bigger and Better Then Ever
GooSearch is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:27 PM   #9
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Quote:
Originally Posted by Fris View Post
write a random function

$file = "urls.txt";
$fp = file($file);
srand((double)microtime()*1000000);
$urls = $fp[array_rand($fp)];
echo $urls;

could do that and call it from

<a href="<?include "random.php"?>">

and if they must be .html pages you could add to .htaccess

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .inc

dont know if thats what you are looking for or not
good solution , only problem is the links would be spidered as random as well ( although that might be better )

i.e. for seo purposes it might be better for them to be randomly placed but stay static
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:30 PM   #10
BV
wtf
 
BV's Avatar
 
Industry Role:
Join Date: Sep 2001
Location: Bikini State, FL USA
Posts: 10,914
you might be able to do a search and replace and replace the said URL with an include tag of some sort. (php. cgi etc..) and let it include your other urls at random.
BV is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:32 PM   #11
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally Posted by Fris View Post
write a random function

$file = "urls.txt";
$fp = file($file);
srand((double)microtime()*1000000);
$urls = $fp[array_rand($fp)];
echo $urls;

could do that and call it from

<a href="<?include "random.php"?>">

and if they must be .html pages you could add to .htaccess

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .inc

dont know if thats what you are looking for or not
you know, that might actually work better, cause then the page would be changing constantly
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:32 PM   #12
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally Posted by SmokeyTheBear View Post
good solution , only problem is the links would be spidered as random as well ( although that might be better )

i.e. for seo purposes it might be better for them to be randomly placed but stay static
yeah,i was thinking that too...not a bad idea
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:33 PM   #13
OzMan
Confirmed User
 
OzMan's Avatar
 
Join Date: Sep 2003
Location: Los Begas
Posts: 9,162
time machine and includes would be your best bet

I haven't seen any batch search and replace program that will pull randomly from a file so I think you gotta go the script route
OzMan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:38 PM   #14
Thurbs
The Thrilla in Manila
 
Join Date: Sep 2004
Location: Thurbs' Lagoon, Christmas Island
Posts: 4,785
serverside it can be done with a simple command line if ur handy in lin
Thurbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:39 PM   #15
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Quote:
Originally Posted by OzMan View Post
time machine and includes would be your best bet

I haven't seen any batch search and replace program that will pull randomly from a file so I think you gotta go the script route

I made a custom one that will do all subs etc , just its actually more intensive than jace needs.. mine actually reads each html page and detects the pages main keywords and attempts to match and replace links with other appropriate links
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:43 PM   #16
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally Posted by SmokeyTheBear View Post
I made a custom one that will do all subs etc , just its actually more intensive than jace needs.. mine actually reads each html page and detects the pages main keywords and attempts to match and replace links with other appropriate links
woah

is that server side or desktop app?
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:47 PM   #17
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
ok i just recoded mine to do what you want icq me
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 08:55 PM   #18
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Quote:
Originally Posted by Jace View Post
woah

is that server side or desktop app?
server but i could do both
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 09:13 PM   #19
SlamDesigns
Confirmed User
 
Join Date: Jul 2005
Posts: 2,339
Quote:
Originally Posted by SmokeyTheBear View Post
server but i could do both
This isn't meant to sound sarcastic, I am 100% sincere...are you a fucking genius? I've seen a few posts about your coding and all I can say is WOW! I do well to mess with basic HTML and PHP...but what you do...WOW!
SlamDesigns is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 09:17 PM   #20
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
if you still need a solution, and are looking to invest a few bucks, hit me up, icq: 33375924
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-15-2006, 09:40 PM   #21
Kimo
...
 
Join Date: Jan 2006
Location: Maryland ICQ:87038677
Posts: 11,542
hope you got it fixed, i said fuck it and went through about 100 pages the other day to replace urls
__________________
...
Kimo 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.