I want to build a script (php or java what you think best) that would replace links in articles in a certain way.
I want to build a script (php or java what you think best) that would do 2 things:
1. I give the tool a list of urls and a directory full with articles that have links on them the tool should take each url and replace it (the urls that with in the article) with a url from the list, so that if an article has 5 urls in it they would be replaced with 5 different urls from the list. The tool should take the urls one after another and not randomly. The tool should also give the option to change the anchor text for those links in the articles when a list of keywords is provided. If the urls\anchors list reached the end and ther are still more articles\links to go it should start from the beginning of the urls\anchors list.
For instance, if I give the tool a list of 100 urls, a list of 100 keyword sequences and 40 html articles with 3 links on every article the tool will replace all the urls in the article with the new urls by their order and will replace the keyword sequences with the anchor text of the articles. When the tool reaches the end of the url\keyword list it will start from the beginning until the articles are ended.
The anchor replacement should be optional.
Also the tool should have the option of stripping all the links form the given article and replacing only the first X links on every article.
*Bear in mind that I may tweak it a bit more.
2. Same as above with some differences. The urls would be replaced in a PHPBB code form [url=[url removed, login to view]'.com]anchor to replace [/url]. There should be an option to replace the anchors too or to leave them as they were. After the tool does that it should add to the end of the article some text (I will provide it) and the articles title.
The tool eventually will generate a text/word file that contains all the produced articles. That long text file will have an option that will let the user set up the number of articles on each text file.
*Bear in mind that I may tweak it a bit more.
**One important thing at the end, the article should have an option to look like a regular article (no html code) but with the code of the links on it.
Many people will want to know what exactly the XBOX 360 is. The Xbox 360 is a next generation video game system that can play both games and DVD movies right out of the package. [url=[url removed, login to view]'.com] The XBOX 360 [/url] can also play some games from the original XBOX. The biggest feature is the high definition feature of the new system. <a herf=[url removed, login to view]'.com> The XBOX 360 </a> graphics are much more enhanced than other graphics.
*the tool will give a report of what he has done.
*The tool should look simple and handy.
In PHPBB mode the tool gives a set (or one long) text/word file with the articles
In regular mode the tool gives a text/word/html files according to the number of the articles. (When in text\word file the title will be at the beginning of the article.)
**It should look like this:**
*Upload url list (e)_____ [txt file, one per line, an "view" and "clear" bottoms should be added]
*Upload articles (0) _____ [a zipped folder, the number shows the number of available to modify articles in the base, an "view" and "clear" bottoms should be added]
Upload anchor list (e)______ [txt file, one per line, an "view" and "clear" bottoms should be added]
*=mandatory when base is empty
1. How many articles to use? ____
2. Don't delete used articles from base? ___ [check box]
3. How many urls to replace on each article? ___ Start replacing from the end? ___ [check box. When checked it will replace the preset amount of links starting from the end and strip of the rest. E.g. if you set it to 2 without check the box it should replace the first 2 and strip the rest.]
4. PHPBB code? ___ [check box]
5. Code type? Html link+text, text+phpbb, regular html [check box, when one of the first 2 is checked it raises another question: "File type? Word, text" [check box] if the user chooses regular html then it will be produced with all the html code like a regular html. If multiple types or codes are checked it will produce multiple files]
6. How many articles on each file?___ [a= all in one, numbers for number of articles on each file]
* When text+phpbb is checked: the last line on every article would be the title and some code that I will provide. When html link+text is checked the first line in every article would be the articles title, empty line, article.
*wrong or empty boxes will produce an error message.
*being available on the phone will make it much easier to do it ASAP so this is an advantage for me to accept your bid.