Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Time To Seconds


I am writting a script that uses a flash player to tell the user what time the song is at. Well not being good with flash i finaly found a player I llike. The only prpblem is it uses 100 seconds for actually 60 seconds. Listed is an example of code below
PHP Code:




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Php.ini Sets Max Time To 90 Seconds, Yet I Get A "Max Execution Time Of 30 Seconds Exceeded"
This is weird. When I use getId3 to try to read meta tags out of
multimedia files, I get this error:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/
httpd/vhosts/bluewallmultimedia.com/httpdocs/getid3/getid3/
getid3.lib.php on line 54

But if I run phpinfo(), I get this:

max_execution_time9595

and if I ssh to the server and look in php.ini, this is confirmed:

max_execution_time = 95 ; Maximum execution time of each script,
in seconds

This is on a RackSpace server, running RedHat. It's got Plesk
installed.

View Replies !   View Related
Php Time() In Seconds..
I want to create a flood protection for my forum, but I need to know how to set a cookie with the time()+ , lets say 30 secondes.

View Replies !   View Related
Maximum Execution Time - 30 Seconds?
I'm writing a script that will pour over 30,000 records into my MySQL database, but PHP is bugging out and stopping after just 30 seconds....Only about a quarter of my records are getting put into the DB - is there a way I can temporarily modify the limit to this execution time, and then switch it back later if I need to?

View Replies !   View Related
Calculating Time Difference In Seconds?
I need a function to calculate the difference between a supplied date and time and the current date and time, in seconds. Here's what I have: Code:

View Replies !   View Related
Unix Time And Leap Seconds
I have Red Hat Enterprise Linux 4.

I was just reading up about UTC and leap seconds.

Is it true on my system that the Unix time may skip up or down by one second
at midnight when there is a leap second?

By "Unix time" I mean the integer returned by time() and similar functions.

I'm concerned about the "down" case. Some of the software I've written
assumes monotonically-increasing time.

View Replies !   View Related
Convert Time Range To Seconds
What I need is to know how to take a time of 10:00 pm to 12:00 am and get the difference in seconds.

I want to pass in the hour, min and meridiem of a From and To time and get back a difference in seconds between two times, even if one of the times goes into the next day like above.

View Replies !   View Related
Seconds To Time Format Counter
I've been looking through the time functions in the manual, but can't seem to find what I'm looking for. What I'm trying to do is convert an int which is a number representing a counter in seconds. I want to split it up into a more user readable format, up to whatever is needed. maybe just round it off to minutes, or hours/minutes. etc. For example..

34 seconds,
or 1 minute+
or 1 hour, 45 mins
etc

If you get my drift. is there any easy way of doing this, or would it have to be done manually? which would get quite lengthy seeming you'd have to take into account all the plurals and what have you, too. Edit: just thought of a good example. the ebay time remaining counter. As the time gets smaller it gets more accurate, from X+ days. to X seconds. I'm kinda looking for something similar, but counting up instead.

View Replies !   View Related
Specifying A Time In Seconds To Redirect To The Referring Page.
I'm using this in for my login script to redirect user back to referring page:
header ("Location: $HTTP_REFERER");

I would like to display the page that my script produces, after submission so i was wondering if there's a way of specifying a time in seconds to redirect to the referring page.

View Replies !   View Related
Maximum Execution Time Of 30 Seconds Exceeded
I need to process every character in a file, so i open the file read
in buffers of about 8192 bytes and process each buffer, then i write
the output to another file.

the problem is that with large files(>8Mb) i get a script error(Fatal
error: Maximum execution time of 30 seconds exceeded ).

I acess every character in the buffer with
$chr=ord($bufferIn{$i}); (where $i=0...8192)
seems like all he time the script consumes is in the for loop and the
chr/ord functions.

can i do something to speed things up?
is there any other way of acessing a single characher except $bufferIn{$i}?

View Replies !   View Related
Time In Hours-Minutes-Seconds (accumulated)
Time in Hours-Minutes-Seconds (accumulated)

How do I do this?

I have minutes:
$minutes_online = intval((time() - strtotime($data[$i]['dLastLogon']))/60);

Ex:
$minutes_online = 8758;

How do I show this in Hour:Minute:Second - 10:32:22

View Replies !   View Related
Format The Time In Hours, Mins And Seconds
I can't seem to be format the time in hours, mins and seconds. I have looked at php.net/man. Does anyone know?

View Replies !   View Related
Elapsed Time Function - How Do I Convert It To Only Total Seconds?
Below is a good elapsed time function I found. However, I'd like to return
total seconds instead of broken down into days, hours, minutes & seconds.
In other words, I want "125" instead of "2 minutes 5 seconds".

function calcElapsedTime($time)
{ // calculate elapsed time (in seconds!)
$diff = time()-$time;
$daysDiff = floor($diff/60/60/24);
$diff -= $daysDiff*60*60*24;
$hrsDiff = floor($diff/60/60);
$diff -= $hrsDiff*60*60;
$minsDiff = floor($diff/60);
$diff -= $minsDiff*60;
$secsDiff = $diff;
return ('(elapsed time '.$daysDiff.'d '.$hrsDiff.'h '.$minsDiff.'m
'.$secsDiff.'s)');
}

View Replies !   View Related
Maximum Execution Time Of 60 Seconds Exceeded ,how To Solve It?
Fatal error: Maximum execution time of 60 seconds exceeded in H:xampplitehtdocsmlmcardstore.php on line 62

how to solve it?
duno why sometime the browser hang in there....then cause this error msg.

View Replies !   View Related
Preg_match_all Maximum Execution Time Of 60 Seconds Error
I am getting this error. Can it be fixed by setting more than 60 for the
max_execution_time
in php.in file?

Fatal error: Maximum execution time of 60 seconds exceeded in
categorycrawler.php on line 19

on this line i have regular expression

preg_match_all(,,)

View Replies !   View Related
Javascript That Takes A Really Long Time To Load (several Seconds).
I have some javascript that takes a really long time to load (several seconds). Can i have a loading page for this? And if so, how?

View Replies !   View Related
Fatal Error - Maximum Execution Time Of 30 Seconds Exceeded
What could be the cause of this error?

Fatal error: Maximum execution time of 30 seconds exceeded in ht*p://localhost/search.php on line 7

The search.php is an included file. I get this error during the first instance the page is accessed. However, succeeding access does not procedure this error anymore.

The code for search.php (up to line 7) is below:

View Replies !   View Related
Maximum Execution Time Of 30 Seconds Exceeded In Creating Thumbnails
I am trying to create thumbnails from 2500 pictures. But I always get
a Maximum execution time of 30 seconds exceeded" at the statement with
the method with imagejpeg or imagedestroy after processing and
creating 500 thumbnails.

Is there anything I can do to avoid this error?

View Replies !   View Related
Fatal Error: Maximum Execution Time Of 30 Seconds Exceeded In E:
I'm running a simple mail script on a WinNT server. It gives me the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in E:intranetphone.php on line 22 It does send the email though. Code:

View Replies !   View Related
Fatal Error: Maximum Execution Time Of 30 Seconds Exceeded
Im (still) building my stats builder. After much battling I have finally got my code to read in the server log file line by line in reverse without commiting the whole log file to memory by reading the whole thing (if it did the server woul die as the files are HUGE). Once each line has been read the php passes this info to the mysql to be picked up at a later point.

It all works fine, and im happy with my progress.

The only problem? It exceeds the maximum execution time and just stops working! How can I solve this? Is there a way to set the server to let one file run over the 30 secs, or is there a problem in my code??

View Replies !   View Related
 Fatal Error: Maximum Execution Time Of 15 Seconds Exceeded
My host has a maximum execution time of 15 seconds set. I keep getting a PHP Fatal error:

 Fatal error: Maximum execution time of 15 seconds exceeded

Is their anything I can put in my code that will over ride this.

View Replies !   View Related
"Maximum Execution Time Of 30 Seconds Exceeded ..."
I'm working on a script that most certainly at times can take longer then 30 seconds to run.. so I need to either alter the hard-coded value, or if theres a command I can apply IN my script (instead of changing the hard-coded value) to get arround this.. that would be great.

View Replies !   View Related
Display Numbers 1-20 Randomly Without Repeating Any Of The Numbers - Fatal Error: Maximum Execution Time Of 30 Seconds Exceeded
I make a code to display numbers 1-20 randomly without repeating any of the numbers. The result is fine but I keep on getting Fatal error: Maximum execution time of 30 seconds exceeded. Personally I don't think PHP will have much trouble going through the loop. Here's the code:

View Replies !   View Related
Loop Every Ten Seconds
Is it possible to get something to repeat every x number of seconds, like cron but i need it as a function of the actual script.

View Replies !   View Related
Converting Seconds
i need a way to convert seconds into a thing like MySQL server has been up 1 day 34 min and 34 seconds. does anyone have any code or idea on how i would start this.

View Replies !   View Related
Re Run An Include Every 5 Seconds?
Is there a way to refresh an include every 5 seconds?

View Replies !   View Related
Is The $exptime Really In Seconds?
I came across a script that has the following: PHP Code:

$utime=time();
$exptime=$utime-10; // (in seconds)

Is the $exptime really in seconds?

View Replies !   View Related
Sleep For 10 Seconds Help
I am trying to run it will load an iframe for every entry found in my DB, I am trying to make it sleep for 10 seconds between each iframe with: PHP Code:

sleep(10);

PHP Code:

$train = "<table width=800 bgcolor=F0F0F0 aling=center><tr><td colspan=4>&nbsp;&nbsp;&nbsp;$pages<br></td></tr>";
$i=0;
while ($addall = mysql_fetch_assoc($res))
{
    if ($i/2 == ceil($i/2)) $train .= "<tr>";
    $i++;
$train .= "<td width=120 valign=top><BR><iframe src="potspace.php?u=$addall[intId]" width="400"></iframe>";
}
$train .= "<tr><td colspan=4><br><br>&nbsp;&nbsp;&nbsp;$pages<br><br></td></tr></table>";

View Replies !   View Related
Max Execution Time Means Server Execution Time Or Client Browser Hung Up Time?
The max execution time is set up to be 30.

When I submit the requests of execution through the client browser, it shows the execution was running. It still hung up there after 30 seconds, after 2 minutes ...

And the browser hung there forever.

I have another page which saves the reports of the execution, so I open another browser window, and check out the report. It shows me the execution is still going even after 1 minute, 2 minutes... Code:

View Replies !   View Related
Mysql_data_seek Takes...0.15 Seconds
On my testing machine (P4 2ghz, WinXP, Apache, PHP 4, mysql 4.1), when I do
a mysql_data_seek it takes up to 0.15 seconds.

My query that returns all results takes an average of 0.05 seconds on my
machine. The mysql_data_seek on this query result takes 0.15.

How it is possible ? It's there any bug ? I know my ISP is much faster, and
I can't compare with my computer, but this let me thing that I should better
execute a query for the desired records instead of doing a data_seek.

They are about 170 records in the result, taken from 20 tables of an average
of 10 fields each, with around 3000 records in each table. I do show only 10
results on my page, and when I do click on next or previous page, I then
"seek" the 10 next records.

Also I've 2 possibilites to improve performances:

1: Execute 2 queries: one that count the result's ID and an the same wich
returns the result of 10 records

2: Execute the complete query and count from there. Also use seek to show
the correct results.

for now I use the second choice, but performances are very poor.

Since I can't pass the query result from a page to another, at any time I
change the page, I 've to execute the query again....

View Replies !   View Related
Page Loaded In X.x_ Seconds
how can i make something saying: this page was loaded in x.xxxx seconds?

View Replies !   View Related
Redirecting After N Seconds With Header()
I'm using header("Location: member_cp.php");

to send the browser back to a page - however, I would like to set a delay of, say, 2 seconds before redirecting. Is this possible with the header() function, or will I need to do this in a different way? If so, how?

View Replies !   View Related
Session Expire After 30 Seconds?
Can anyone tell me how can I do to a
session expire aftetr 30 seconds?
And where can I find a working demo?

View Replies !   View Related
Seconds To Minutes Conversion
I have a form where a user enters a value that will always be a number which represents minutes. I have the column that receives these values in the mysql table set to time format.

the problem that I'm having is when I send the value form the form to the mysql table the number is treated as seconds. how do I change it so that the value is treated as minutes and not seconds.

View Replies !   View Related
Convert Seconds To Milliseconds
I am trying to mimic the Javascript new Date().getTime(); function with php
and retrieve # of milliseconds since 1970
php's time() function however calculates # of seconds not milliseconds since 1970

I tried multipying by 1 million but then the timestamp turns into 12342434 E + 3243....

It makes it into E's...

So basically how can I mathematically make this string:
 PHP timestamp: 1188186747
equal to this string:
Javascript timestamp: 1188186747328

and without the annoying "E's"

View Replies !   View Related
Submit A Form Every X Seconds
i want to let a form submit ever 2 seconds to test a thing with my server.
how would i go about doing it?

View Replies !   View Related
Display Code After Some Many Seconds
I dont know if I should post this in JavaScript or PHP and other codes because I dont know what suits this. I want make a code, which after some many seconds it will disply the code. Example:

<html>
<? After 3 seconds disply ?>
Hello
else
null
<end>

You know, something like that .

View Replies !   View Related
Difference Of Two Dates In Seconds ?
How can i find the difference of two dates in seconds ?

View Replies !   View Related
Generate The Amount Of Seconds
I have a date formated, which has had seconds added

$newtime = date('Y/m/d H:i:s', strtotime("+$sec seconds"));

How do i generate the amount of seconds after the from the $newtime?

View Replies !   View Related
Howto: Please Wait, This May Take A Few Seconds...
what if i have a webpage that displays the text "please wait, this may take a few seconds..." and it now waits until some event on the server happens.

whatever this is, this can be quick, but it could also be slow, or it can even fail. but once this event has happened, i want the webpage to reload and display a different message, like "the process completed successfully". Code:

View Replies !   View Related
Pausing Script For X Seconds.
I have seen a way to pause a php script for X number of seconds then once that time has past it carry's on! I have been searching and searching but cannot find it.

View Replies !   View Related
Make A Cookie Last For Ten Seconds
I'm experimenting with cookies but have come accross a problem. I'm trying to make a cookie last for ten seconds, it won't let me. When I try for an hour though, it does work. PHP Code:

setcookie($id, "set", time()+3600);

My script only seems to work with numbers higher than 3600. Anyone know what is wrong?

View Replies !   View Related
Small Script Uses To Much CPU Seconds
My host made me move to a dedicated server and I discovered that the only thing using so much CPU was this script. does anyone know how I can optimize this to use less server resources, I want it to look the same but just use less resources, this code gets the job done but it uses so much CPU seconds.

View Replies !   View Related
Session_start() Takes 10-25 Seconds
I'm running a php/mysql database application that stores a database description structure in a session variable. The database schema is on the large side, so this structure can probably be as big as 500kb. Recently, I've begun having a problem where on some pages, the session_start() function call takes a really long time to return, as long as 25 seconds.  This happens in both a single-user and multi-user environment, but it is inconsistent - on some pages it happens every second or third reload, on some pages it doesn't happen at all.

I'm not sure that its related to the size of my structure in a session variable, because the structure has been this big for a long time, but the session_start() problem is relatively new. Does anyone have any suggestions for why this could be taking so long?  Is it a bad idea to store a 500kb structure in a session variable?

View Replies !   View Related
Finding The Seconds Since Last Thursday At 5PM
I have been trying to come up with the logic to calculate the # of seconds since the last occuring thursday at 5PM.  I have not worked with PHP or really any programming in a while, and I am not fully familiar with all of the different date functions. 

I did some research and I came up with some really really messy and probably incorrect logic to try to come up with this. Code:

View Replies !   View Related
Code Doesn't Finish In 3 Seconds
I'm trying to execute a portion of code within a specific number of seconds. If it fails, I need to break out and do something else. To give you an idea of what I mean, take a look at the pseudo code below:

--------
try to complete the code below for 3 seconds { do something that could take a long time. if it doesn't complete within 3 seconds, generate an error which will abort the processing of further instructions in this try } catch (Exception $e) { Execute some different commands since the code above didn't finish quickly enough.}
---------

View Replies !   View Related
File Download Within 5 Seconds
I need to create a download.php file which will provide any file download within 5 seconds. In addition, I would like to log their Ip address and stuff.

View Replies !   View Related
Making Seconds Change
ive added a time () function to my web site but the seconds dont seem to change, ive seen other site doin it. How do you make the seconds change without refreshing the page.

View Replies !   View Related
Page Generated In XXX Seconds
I was reading a post here and toplay referred someone to the http://theomega.org/ for captcha info. I went to checkit out and noticed that on the bottom of the page it said:

Page Generated In: 0.1911 seconds.

View Replies !   View Related
Convert Filemtime To Seconds
Now that I made my ElapsedSecondstoString function, it seems that the value I'm getting back from filemtime is not seconds based (is this right?) According to the docs, it is a Unix timestamp (I'm not familiar with this).

Is there a way to convert the value that is returned from Filemtime so that it is in seconds so I can do:

> $iFiletime - time()

...to get back the number of elapsed seconds?

View Replies !   View Related
Cookie Expiration ... Something Other Then Seconds?
I'm making my first cookie but I don't want it to expire for say 30 days. Now by default I think it does the expiration time by seconds.... 2592000 would be 30 days?

60secx60minx24x30=2592000 .... Anyway thats my understanding at least.

View Replies !   View Related
How Do I Redirect A User To A Page After Say 5 Seconds?
how do i redirect a user to a page after say 5 seconds?

View Replies !   View Related
Converting Timestamp Into Minutes And Seconds
I am timing employees who take a test. I have the start time and end
time, which are unix epochs, and subtracing the start from the end
will give me a large number of seconds, for example 552.
I want to convert this into minutes and seconds.

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved