Hello,
I'm writing a php irc bot. I've come up to the situation where I need a
timer for processing different data in a "special" way. I've searched the
archive of the list but I didn't found nothing helpful (I can't use
JavaScript here, neither cron).
If I use for(;;) or sleep(); the whole scrip
Frank --
...and then Frank Tudor said...
%
% I am trying to create a timer tha would prevent someone from
% clicking submit until the timer reaches zero.
1) Javascript is your only hope to disable clicking through, as suggested
by the other responders.
2) It can still be defeated. How importan
On Fri, 2003-11-21 at 10:51, Frank Tudor wrote:
> I am trying to create a timer tha would prevent someone from
> clicking submit until the timer reaches zero.
>
> THe reason is to keep an individual on a page for a certain
> amount of time.
>
> Does anyone know the best way to do this?
>
> PHP?
From: "Frank Tudor" <[EMAIL PROTECTED]>
> I am trying to create a timer tha would prevent someone from
> clicking submit until the timer reaches zero.
JavaScript.
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am trying to create a timer tha would prevent someone from
clicking submit until the timer reaches zero.
THe reason is to keep an individual on a page for a certain
amount of time.
Does anyone know the best way to do this?
PHP? Javascript?
Any examples?
Frank
__
> Just a little curious. Is there any other way other than cron to do
> this. Is it possible to run a PHP script in an endless loop and when
the
> clock strikes, run another script?
Yeah, I think so, but it'd be worth the effort to just learn cron. You
can use set_time_limit() to zero and run your
22, 2003 9:40 PM
> To: 'Michael Gaab'; [EMAIL PROTECTED]
> Subject: RE: [PHP] timer problem
>
> > i want to automate some activities by date. on a certain date i
want
> to
> > do
> > some specific processing. the application is web based using apache.
i
&
> i want to automate some activities by date. on a certain date i want
to
> do
> some specific processing. the application is web based using apache. i
> guess
> i would need some way of calling the program daily to see if "today is
the
> day." thread/daemon? any suggestions appreciated.
Use cr
hi.
i want to automate some activities by date. on a certain date i want to do
some specific processing. the application is web based using apache. i guess
i would need some way of calling the program daily to see if "today is the
day." thread/daemon? any suggestions appreciated.
mike
--
P
At 22:28 11.11.2002, Mohsin Rahman said:
[snip]
>1) How to pass the STARTTIME only when the START TASK button is pressed?
>
>Apprently using
>
>echo "onclick=\"window.open('popup.html?clientid=$starttime=strtotime(\"now\")&$th
>isclientid&projectid=$thisclien
OK.. probably a easy thing, but I am complicating it too much. Here is
what I am
trying to accomplish.
Using PHP4.0.2 and PostgreSQL 7.1.
I am creating a time tracking system where a user, based on their login,
gets a list
of open projects. I have clientid, projectid, description, estimate
time,
J> So under the time() call, comparing it to a simple numerical value such as
J> "300" it knows that you are talking about 300 seconds? Is that because it
J> is a unix timestamp? I previously tried using date("s") to give me the
J> seconds from today's date then tried the compare, so using time(
So under the time() call, comparing it to a simple numerical value such as
"300" it knows that you are talking about 300 seconds? Is that because it
is a unix timestamp? I previously tried using date("s") to give me the
seconds from today's date then tried the compare, so using time() will work
J>> I am not able to test from this machine so please tell me if I am right or
J>> wrong on this:
J>> $tmp = time();
J>> $tme = time() - 5*60;
J>> session_register('tmp');
if ($tmp >>>= $tme) {
J>> echo 'Time has not reached 5 minutes, session still valid';
J>> } else {
J>> echo 'Timer has
J> I am not able to test from this machine so please tell me if I am right or
J> wrong on this:
J> $tmp = time();
J> $tme = time() - 5*60;
J> session_register('tmp');
if ($tmp >>= $tme) {
J> echo 'Time has not reached 5 minutes, session still valid';
J> } else {
J> echo 'Timer has reached
I am not able to test from this machine so please tell me if I am right or
wrong on this:
$tmp = time();
$tme = time() - 5*60;
session_register('tmp');
if ($tmp >= $tme) {
echo 'Time has not reached 5 minutes, session still valid';
} else {
echo 'Timer has reached 5 minutes, you will need
J> Not sure how to go about setting up a function to parse the date, hour,
J> minutes, seconds, take the seconds and register them in a session var, then
J> do a check on the session var (seconds) vs. the seconds var + 5*60 (or 5
J> minutes) to time out the session and force the user to log back i
Not sure how to go about setting up a function to parse the date, hour,
minutes, seconds, take the seconds and register them in a session var, then
do a check on the session var (seconds) vs. the seconds var + 5*60 (or 5
minutes) to time out the session and force the user to log back in. My
probl
te the difference between then and how. Store that
> value in another file or database. Update the file with a fresh
timestamp.
> -Kevin
>
> - Original Message -
> From: "Thomas "omega" Henning" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
enning" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 11:22 AM
Subject: [PHP] Timer
> Is this possible:
>
> Im making a bot in PHP and i need a timer. Lets say noone ses anything for
> 2mins in the channel after that the bot ses something
Is this possible:
Im making a bot in PHP and i need a timer. Lets say noone ses anything for
2mins in the channel after that the bot ses something. And if the bot
recieves an msg the timer clears. Is this possible 2 be done?
Thomas "omega" Henning
--
PHP General Mailing List (http://www.php
On Fri, 22 Jun 2001 06:41, george wrote:
> My back is aganist the wall with this one, I have to create a timer .
>
> What happens is admin will enter a time say 2 hours in the future
> this time will be stored in a db as a time stamp
> then the current time and the timestamp from the db are su
On Fri, 22 Jun 2001 06:41, george wrote:
> My back is aganist the wall with this one, I have to create a timer .
>
> What happens is admin will enter a time say 2 hours in the future
> this time will be stored in a db as a time stamp
> then the current time and the timestamp from the db are su
My back is aganist the wall with this one, I have to create a timer .
What happens is admin will enter a time say 2 hours in the future this
time will be stored in a db as a time stamp
then the current time and the timestamp from the db are subtracted from one
another and the result is shown
I'm guessing it's either for a Quiz script or an Auction script.
If you want to make it easy on yourself, use a database to store the
starting time (when the timer "starts") and what time the test/auction
should end. When someome makes a submission, get the time stored in the
database and see if
there is no sure way, but using cookies/sessions you can make something that will
*work* . assign the user a session_id, every time the user makes an entry add a value
to the db,
session_id = $SessionID
next_time = time() + 120
every time you make an entry, check to make sure that next_time <
I need to have a time running and after a certain time it will not allow
you to submit anything else, on top of that if someone makes an entry with
less than 2 minutes to go the time must be extended by 5 minutes.
I really am at a loss how to do this.
Can it be done.
TIA
George
--
PHP Ge
27 matches
Mail list logo