How to auto add different content to each html page?

Coolman

New member
Joined
Jan 29, 2018
Messages
1
Points
0
Hello! I need to copy a few lines of text from my txt files to my html pages. In all these files the text is different. It needs to be distributed randomly, without repetition, on html pages.

With the help of which program can this be done?
 

OlaSidiq

New member
Joined
Jan 20, 2018
Messages
4
Points
0
If the HTML files are on a web server, you should use filezilla to add the content. However, if it on your computer, bracket will do the work. (bracket.io). I hope that answers you question.
 

Mike001

New member
Joined
Apr 27, 2016
Messages
578
Points
0
If I understand you correctly, you will want to do this using a web processing language.

I would recommend the most popular language on the web, PHP.

PHP can read the text file, have PHP take the lines that are generated build an array with each line assign a random id, using the random id number place that text randomly into text fields on the web page or multiple web pages.

1. Read the text file
2. Build an Array with the text values.
3. Using the Unique ID of the values in the Array build a random generator of the values.
4. Select a value from the random generator, assign the text to a text area on the web page, insure that the random value has not been previously assigned, build an array with the values that have been assigned.
5. Add the unique ID to the assigned array.
6. Repeat until the text fields array is empty.

It would take a little code and some serious testing to make sure it was operating correctly but it could be done without a lot of difficulty. There are probably 100's of different ways to do this, this is just one quick flow example.
 
Older threads
Newer threads
Replies
1
Views
4,571
Replies
5
Views
4,869
Replies
4
Views
1,909
Latest threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top