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.
 
Newer threads
Replies
1
Views
1,225
Replies
5
Views
2,291
Replies
4
Views
875
Latest threads
  • Awaiting approval
Replies
0
Views
1
MS6
  • Awaiting approval
Replies
0
Views
1
  • Awaiting approval
Replies
0
Views
1
  • Deleted
  • Deleted by Admin
Replies
0
Views
1
Recommended threads
Replies
45
Views
21,585
Replies
9
Views
3,333
Replies
4
Views
2,286
Replies
7
Views
8,627
Similar threads
Replies
4
Views
2,189
Replies
1
Views
2,604

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Latest Blog ArticlesMost Viewed Threads

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