#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Exclamation Edit HTML file with PHP dynamically adding new html/links every night


    I have got some batch scripts what makes timelapse videos at the end of every day and names them like "Timelapse_dd_mm_yyyy.mp4".

    I now want to edit a basic and static html file automatically every night and add/append some html code on a certain line for a link to the latest time lapse video.

    So every night the html files grows slightly larger.

    How do I do this with PHP so it adds the relevant html code for the time lapse video at a certain time every night. The HTML content also needs to have the current file names of all the videos.



    So for example, the following links would be added as so.

    Time lapse 01/12/12 (Click to download) - Would be added on the first of December

    Time lapse 02/12/12 (Click to download) - Would be added on the second of December

    Time lapse 03/12/12 (Click to download) - Would be added on the third of December



    Finally videos would be in "/time_lapse_videos" and html file would be in current directory
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,113
    Rep Power
    9398
    Do it the normal way: make PHP be the thing which outputs this HTML, then you can have it do whatever it wants without having to try to modify existing files or anything complicated like that.
  4. #3
  5. Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2004
    Location
    New Springfield, OH
    Posts
    1,236
    Rep Power
    1469
    So what you're saying is that you want a static HTML file that's not actually static.

    A page that changes, by definition is dynamic not static.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!

IMN logo majestic logo threadwatch logo seochat tools logo