Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    Member #
    15078
    I ftp my home CCTV images every 15 seconds to my web page, but sometimes it does not comeplete and the CCTV program creates a temp.jpg file on my website.
    I need the html file to have some code in it to actually delete this temp file every x seconds if it exists.

    Any ideas what the code should be.

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    You will need a server side language (Ruby, PHP, ASP and so on) to do the deleting and detecting for the file. Does your host support any of them?

  4. #3
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    Member #
    15078
    I believe it does host asp
    This is the current script I am using.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <!-- Created with the CoffeeCup HTML Editor 2007 -->
    <!-- http://www.coffeecup.com/ -->
    <!-- Brewed on 2006/11/18 01:30:04 PM -->
    <head>
    <title></title>
    </head>
    <body>
    </head>
    <body bgcolor=white lang=EN-US link=blue vlink=blue style='tab-interval:36.0pt'>
    <div class=Section1>
    <!--<p class=MsoNormal>Home monitor</p>
    <p class=MsoNormal><o>&nbsp;</o></p>-->

    <img src="http://home.telkomsa.net/naudeap/camwizard2/image2.jpg" name="CCVTV2" width="320" height="240" alt="2!">
    <script language="JavaScript">

    </script>
    <!-- End Image Code -->
    <!--<img src="http://home.telkomsa.net/naudeap/camwizard3/image3.jpg" name="CCTV3" width="320" height="240" alt="3!">
    <script language="JavaScript">-->

    </script>
    <!-- End Image Code -->
    <img src="http://home.telkomsa.net/naudeap/camwizard5/image5.jpg" name="CCTV5" width="320" height="240" alt="5!">
    <script language="JavaScript">
    </script>
    <!-- End Image Code -->
    <a href="<A href="http://home.telkomsa.net/naudeap/default.html"><font">http://home.telkomsa.net/naudeap/default.html"><font color="#FFFFFF">+</font></a>
    <!--<div style="font:normal 11px arial,sans-serif;text-align:center; margin:1em auto;">::: Made with CoffeeCup : <a href="http://www.coffeecup.com/" title="HTML - FTP - Flash" style="text-decoration: none"> Web Design Software &amp; Website Hosting</a> :::</div>-->
    </body>
    <script language="Javascript">
    var time=15000;//in ms...
    function refresh(){window.history.go(0);}
    setTimeout('refresh()',time);
    </script>
    </html>

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    The best solution is actually using some sort of periodic execution software on the server. If they have ASP, that probably won't be possible, but if you're on a UNIX server, you can use cron with a very simple shell script (actually, the shell script would even be optional for something this simple) and set it to run every X amount of time.

  6. #5
    Junior Member
    Join Date
    Apr 2007
    Posts
    3
    Member #
    15078
    OK, so for a total html coding idiot :surprised: , how do I do it!

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    If you can use PHP, how about making the extension of
    your web page .php and whenever someone visits or
    refreshes the page, it checks for the file and deletes
    it if it exists.

    Let us know if you can make the extension of your page .php
    (example: index.php)

    Then, let us know if that would be a good option for you.

    Below is the script you would put at the very top of your .php web page:
    ==========================================

    PHP Code:
    <?php
    // Check if file exists, if so, delete it, otherwise, do nothing.

    // path and filename
    $file="temp.jpg";

    if (
    file_exists($file)) {
        
    unlink($file);
    } else {
        
    //do nothing
    }
    ?>

    EDIT:
    And I'm guessing that's YOU that I see on this page?
    http://home.telkomsa.net/naudeap/



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:57 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com