[PHP] timer in php-cli

2004-03-01 Thread nobody
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

Re: [PHP] Timer and submit button

2003-11-21 Thread David T-G
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

Re: [PHP] Timer and submit button

2003-11-21 Thread RT
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?

Re: [PHP] Timer and submit button

2003-11-21 Thread CPT John W. Holmes
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

[PHP] Timer and submit button

2003-11-21 Thread Frank Tudor
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 __

RE: [PHP] timer problem

2003-02-22 Thread John W. Holmes
> 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

RE: [PHP] timer problem

2003-02-22 Thread Siddharth Hegde
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 &

RE: [PHP] timer problem

2003-02-22 Thread John W. Holmes
> 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

[PHP] timer problem

2003-02-22 Thread Michael Gaab
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

Re: [PHP] PHP Timer + Java

2002-11-12 Thread Ernest E Vogelsinger
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

[PHP] PHP Timer + Java

2002-11-11 Thread Mohsin Rahman
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,

Re[4]: [PHP] timer on sessions?

2002-07-17 Thread Asmodean
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(

Re: Re[2]: [PHP] timer on sessions?

2002-07-17 Thread Jas
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

Re[3]: [PHP] timer on sessions?

2002-07-17 Thread Asmodean
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

Re[2]: [PHP] timer on sessions?

2002-07-17 Thread Asmodean
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

Re: [PHP] timer on sessions?

2002-07-17 Thread Jas
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

Re: [PHP] timer on sessions?

2002-07-17 Thread Asmodean
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

[PHP] timer on sessions?

2002-07-17 Thread Jas
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

Re: [PHP] Timer

2002-07-16 Thread Thomas \"omega\" Henning
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]>

Fw: [PHP] Timer

2002-07-16 Thread Kevin Stone
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

[PHP] Timer

2002-07-16 Thread Thomas \"omega\" Henning
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

Re: [PHP] PHP timer

2001-06-22 Thread David Robley
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

Re: [PHP] PHP timer

2001-06-22 Thread David Robley
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

[PHP] PHP timer

2001-06-21 Thread george
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

Re: [PHP] timer in PHP

2001-04-11 Thread Plutarck
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

Re: [PHP] timer in PHP

2001-04-11 Thread Chris Lee
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 <

[PHP] timer in PHP

2001-04-11 Thread george
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