Jump to content

timer reset


mandukar

Recommended Posts

hi I am trying to write up a script that when the timer gets to a time e.g. 12:00 it automaticly runs a page called reset.php

 

basiclly my question is how would I get the script to run my reset.php page

 

here is the script I galthered so fare.

any help will be greatful

 

 

<?php

$target = mktime(0, 0, 0, 2, 10, 2007) ;

$today = time () ;

$difference =($target-$today) ;

$days =(int) ($difference/86400) ;

?>

Link to comment
Share on other sites

so if i used

<?php

$date = date(H);

if ($date = "12") {

header("Location: reset.php");

}

 

?>

 

would that mean i'd have to view the page? that this script is on? or would it work on its own? and thanks for that cron job link, i'll have a look at that too

Link to comment
Share on other sites

i've had a read of that cron job thing and they gave an example

 

# DO NOT EDIT THIS FILE - edit the master and reinstall.

# (ipwatch.cron installed on Thu Nov 18 11:48:02 1999)

# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)

10 3 * * * /usr/bin/foo

 

do I put <? and ?> at the start n end of that script or just leave it as it is and save it as a txt document?

Link to comment
Share on other sites

PHP itself can't do anything without a viewer, viewing the page.

 

What CRON do, it runs the file every X time. But it isn't enough to just have access to the FTP server, you need to install it on the server you're using, so it's quite a problem if you have rented a Web hotel.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.