![]() |
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? |
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.
|
Quote:
|
im not sure, but heres a bump
|
Perhaps a perl or php script might help.
|
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 |
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
|
have you tried dreamweavers find and replace..i have done 230 pages.. nothign random though sry
|
Quote:
i.e. for seo purposes it might be better for them to be randomly placed but stay static |
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.
|
Quote:
|
Quote:
|
time machine and includes would be your best bet :winkwink:
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 |
serverside it can be done with a simple command line if ur handy in lin :)
|
Quote:
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 |
Quote:
is that server side or desktop app? |
ok i just recoded mine to do what you want icq me
|
Quote:
|
Quote:
|
if you still need a solution, and are looking to invest a few bucks, hit me up, icq: 33375924
|
hope you got it fixed, i said fuck it and went through about 100 pages the other day to replace urls
|
All times are GMT -7. The time now is 06:58 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123