First of all I am a novice client side only HTML person. I run a web site which has results that need to be uploaded every week. To simplify the addition of a new line I have created a file that is then included into the main html file as follows (let's call it results.htm):
<br><a href="R20150729.htm">27 Jul 2015</a>
<br><a href="R20150722.htm">22 Jul 2015</a>
-----
-----
<br><a href="R20150715.htm">15 Jul 2015</a>
Every week I (or colleagues) have to log onto the host and edit the file manually to add the extra line at the top.
(The reason it is such a basic file and uses an iframe to embed code is that some people find it difficult to find the correct line and modify it when there is a lot of HTML in the file.)
The Ryyyymmdd.htm can easily be uploaded using FTP and I am now trying to avoid having to log on and modify results.htm
One way I had thought of doing this is to create todays results
e.g. <a href="R201508.03.htm">03 AUG 2015</a>
This can be done easily with a text editor on the local PC. It can then be uploaded as for example, recent.txt I then need to add recent.txt to the front of results.htm. I guess appending results.htm to recent.txt then renaming results.htm as resultsold.htm and renaming recent.txt (which now has all the lines) to results.htm would give me
<br><a href="R20150803.htm">03 Aug 2015</a>
<br><a href="R20150729.htm">27 Jul 2015</a>
<br><a href="R20150722.htm">22 Jul 2015</a>
-----
-----
<br><a href="R20150715.htm">15 Jul 2015</a>
What I want to avoid is downloading results.htm, adding a line at the beginning and then uploading it.
Ideas and or some code would be appreciated. I am using Filezilla as my FTP The crunch is to try and get everything automated so a click of a button can do it all and avoid logging into the web server and modify the line manually. If it can be done by messing around in the FTP program, or if REALLY necessary some server side code (I have not done this before).
Thanks.