473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to call other scripts without header method

I would like to know how I can automatically call other scripts if I
have to first display a message. The reason is I would like to
display a message for about 30 seconds then automatically call another
script but if I do this with header() I get an error.
Another question I have is, Is there a PHP method equivalent to
setInterval() in JavaScript?

Thank you
John
Jul 17 '05 #1
3 1970
*** John wrote/escribió (23 Mar 2004 08:42:30 -0800):
Another question I have is, Is there a PHP method equivalent to
setInterval() in JavaScript?


Hmmm... sleep() maybe?
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #2
On Tue, 23 Mar 2004 08:42:30 -0800, John wrote:
I would like to know how I can automatically call other scripts if I
have to first display a message. The reason is I would like to
display a message for about 30 seconds then automatically call another
script but if I do this with header() I get an error.


You could use this to display a message and redirect after 30 seconds:

<html>
<head>
<META HTTP-EQUIV="REFRESH" CONTENT="30;URL=http://your.redirect.url">
</head>
<body>
Your message here
</body>
</html>

Regards,
Henk Burgstra
Jul 17 '05 #3
>
The HTTP-EQUIV means you're trying to fake an HTTP header. PHP gives
you the advantage of issuing a proper HTTP refresh header. I've never
done it, but this may work:

header("Refresh: 30; URL=http://example.com/");

From the quick bit of Googling I've done, I read that some browsers
may not support this header, but it is still more reliable than a META
refresh. Also, the redirect address should be included as part of your
message.


Sure, but the op asked for a solution *without* using the header method
because that caused an error.

Regards,
Henk Burgstra
Jul 17 '05 #4

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

Similar topics

1
by: Charles Soto | last post by:
I've got a main loop script that calls two other scripts that do no user interaction. All they do is send a couple of mysql update statements. Then they use header() to call the main loop again. ...
1
by: annie | last post by:
Can anyone point me in the right direction here? I've got this little image script <?php $im = ImageCreate(200,200); $white = ImageColorAllocate($im,oxFF,oxFF,oxFF); $black =...
10
by: Carramba | last post by:
hi! I don't have eny code to chare, this is just teoretical question. usualy you have for looks like <form method="POST" action="some_php_script.php"> namn: <input type="text" name="name"...
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
7
by: Duff B | last post by:
Hi, this code perfectly works when I try to force the download of a file, by calling it directly. <?php $file = "onefilename.txt"; if (!is_file($file)) { die("<b>404 File not...
3
by: paolo.dx | last post by:
Hello, I have to call a member funtion "myclass.myfunc()" from another function "void method();" but I don't know the name of "myclass" and "myfunc()" because I'm writing a library.h that has to be...
8
by: Eric | last post by:
I am writing a program with several header files. I would like for some of them to be aware of others. Here is a small example of my problem in three different files: //// main.c++ #include...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.