473,503 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

causing a ............. delay in the script

I have a script which uploads files to my site.
I limit file size and the files upload quickly
The a summary of what happens is

MESSAGE "Uploading bla bla bla file details bla bla bla
Script to transfer the files
MESSAGE "File uploaded sucessfully"

Because this happens so quickly the messags appear at the same time. I wish
to have a second delay between the first and second message. How do I insert
a delay into my script. This is purely cosmetic just to create the
impression that something is churning away uploading the file

Ian
Jun 27 '06 #1
7 1523
Ian Davies wrote:
Because this happens so quickly the messags appear at the same time.
I wish to have a second delay between the first and second message.
How do I insert a delay into my script. This is purely cosmetic just
to create the impression that something is churning away uploading
the file


http://www.php.net/sleep
JW
Jun 27 '06 #2
"Ian Davies" <ia********@virgin.net> wrote in message
news:C9*****************@newsfe6-win.ntli.net...
I have a script which uploads files to my site.
I limit file size and the files upload quickly
The a summary of what happens is

MESSAGE "Uploading bla bla bla file details bla bla bla
Script to transfer the files
MESSAGE "File uploaded sucessfully"

Because this happens so quickly the messags appear at the same time. I
wish
to have a second delay between the first and second message. How do I
insert
a delay into my script. This is purely cosmetic just to create the
impression that something is churning away uploading the file

This reminds me of a WTF published at thedailywtf.com some time ago:
http://thedailywtf.com/forums/thread/74323.aspx

Bascily this is what happened: customer doesn't believe an analysis could
run so and so fast and insisted that it's broken, so the programmer checks
the code just to see it in fact works correctly, so he adds a delay and a
dummy progress bar to the software to give the client an impression of
something happening. Later client complains it's now too slow, could they
perhaps optimize the code. Sure, the developer reduces the delay to a
shorter time and the company charges $5000 for "optimizing" the process.
Client happily pays and gets faster program. Everyone's happy!

--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
sp**@outolempi.net | Gedoon-S @ IRCnet | rot13(xv***@bhgbyrzcv.arg)
Jun 27 '06 #3
In message <C9*****************@newsfe6-win.ntli.net>
"Ian Davies" <ia********@virgin.net> wrote:
I have a script which uploads files to my site.
I limit file size and the files upload quickly
The a summary of what happens is

MESSAGE "Uploading bla bla bla file details bla bla bla
Script to transfer the files
MESSAGE "File uploaded sucessfully"

Because this happens so quickly the messags appear at the same time. I wish
to have a second delay between the first and second message. How do I insert
a delay into my script. This is purely cosmetic just to create the
impression that something is churning away uploading the file

Ian


Could you not do a loop inbetween the messages, and just experiment
until you have a nice delay?

--
Kev Wells http://kevsoft.topcities.com
http://kevsoft.co.uk/
ICQ 238580561
Its nice to be important but Important to be nice.
Jun 27 '06 #4
Usually when a customer doesnt get it, it just means the message is not
clear. Just change the second message to say:

"After a long and tedious upload we have finally uploaded your file
succesfully. "

or if you dont want to be cynical just say:

"Uploading bla bla bla file details bla bla bla ....\nFile uploaded
succesfully".

This way it gives the illusion that the upload did something. It's all
about the message.

Or you can use sleep(n secs);

Ian Davies wrote:
I have a script which uploads files to my site.
I limit file size and the files upload quickly
The a summary of what happens is

MESSAGE "Uploading bla bla bla file details bla bla bla
Script to transfer the files
MESSAGE "File uploaded sucessfully"

Because this happens so quickly the messags appear at the same time. I wish
to have a second delay between the first and second message. How do I insert
a delay into my script. This is purely cosmetic just to create the
impression that something is churning away uploading the file

Ian


Jun 27 '06 #5
Just tried the sleep function it doesnt seem to work
code as follows

echo "$prog_msg";
sleep(1);
echo "$prog_msg2";

The two messages appear at the same time. am i using this function correctly
Thought it might not be long enough delay but same result with sleep(10);
Ian
"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:44***********************@news.euronet.nl...
Ian Davies wrote:
Because this happens so quickly the messags appear at the same time.
I wish to have a second delay between the first and second message.
How do I insert a delay into my script. This is purely cosmetic just
to create the impression that something is churning away uploading
the file


http://www.php.net/sleep
JW

Jun 27 '06 #6
Rik
Ian Davies wrote:
Just tried the sleep function it doesnt seem to work
code as follows

echo "$prog_msg";
sleep(1);
echo "$prog_msg2";

The two messages appear at the same time. am i using this function
correctly Thought it might not be long enough delay but same result
with sleep(10); Ian


Perhaps:
echo "$prog_msg";
flush();
sleep(10);
echo "$prog_msg2";

If that doesn't work, look at the comments in
http://www.php.net/manual/en/function.flush.php

Grtz,
--
Rik Wasmus
Jun 27 '06 #7
Message-ID: <W9*****************@reader1.news.jippii.net> from Kimmo
Laine contained the following:
This reminds me of a WTF published at thedailywtf.com some time ago:
http://thedailywtf.com/forums/thread/74323.aspx

Bascily this is what happened: customer doesn't believe an analysis could
run so and so fast and insisted that it's broken, so the programmer checks
the code just to see it in fact works correctly, so he adds a delay and a
dummy progress bar to the software to give the client an impression of
something happening. Later client complains it's now too slow, could they
perhaps optimize the code. Sure, the developer reduces the delay to a
shorter time and the company charges $5000 for "optimizing" the process.
Client happily pays and gets faster program. Everyone's happy!


Tempting to put one of those in every script >:-)

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jun 27 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
18803
by: Des L. Davis | last post by:
System: Dell PowerEdge Server with 3 GB RAM, 2.4 GHz Celeron Software: Microsoft SQL Server 2000 Enterprise running on Windows 2003 Server Software: Microsoft SQL Server 2000 Enterprise running on...
6
2563
by: Salty Dog | last post by:
Code: <%Response.Buffer = False%> <HTML> <HEAD> <title>Printing</title> </HEAD> <BODY> <center> <% FilePath = "c:\WUTemp\441817810_receiver.txt"
1
2418
by: M.L. | last post by:
Hi NG, I hope someone in here is able to help me in this matter. The problem: I have created a Javascript drop-down menu which expands when moving the mouse into a tablecell (calls my Expand()...
7
3410
by: JellyON | last post by:
Hi. Is there a way to delay a call to a page counter (ie. call to a server script from an IMG tag) for the purpose to not lock the page loading awaiting counter be displayed. Maybe a...
14
4625
by: Rene Grothmann | last post by:
I have managed to communicate between forms and Java applets. A button press sends the content of the text area to an applet, a second button gets some text from the applet and puts it into the...
3
4340
by: Sirix42 | last post by:
Hi there, when I use Firefox to run my application (this involves sending an IFRAME request to the servlet and handling the response), there is no delay in displaying the data after each response....
1
1316
by: whitesmith | last post by:
I've read the FAQ about means of implementing a delay, but nothing seems to work for me. My HTML page looks like this: <html> <head> .... usual html stuff and then: <script...
2
5076
by: Rahina | last post by:
I am working in Dreamweaver 8, and I have created a simple form: http://www.realmofmystery.com/app.html This is a free website I am doing for some friends, so nothing fancy. And, I learned web...
6
7933
by: sheldonlg | last post by:
I came across a problem and googling for an answer didn't help. What I want to do is run an AJAX script that sets a hidden variable on the form. I call the AJAX script from a javascript...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.