Please e-mail your responses to me, thanks.
Beny
--
___________ "I have summoned you here for a purpose..."
// I \\ "Nobody summons Megatron!"
// I \\ "Then it pleases me to be the
first..."
// /UUU\ \\
II /UUUUUUU\ II
II======]U> <U[======II o
II \UUUUUUU/ II /|\\
\\ \UUU/ // / \
\\ I //
\\_____I_____//
print"Location: http://PAGE HERE
Beny Spensieri wrote in message <36FD1EE7...@utoronto.ca>...
print "Location: http://mypage.com\n\n";
(You forgot the double "\n" and the end (";)
> I need a script that will forward a user to another page after a
> few seconds. This is commonly used to send web serfers to the
> new location of a web page that has moved.
Scripts aren't needed for that; simply put
<META HTTP-EQUIV="refresh" CONTENT="5; URL=http://newurl">
in the HTML, somewhere between <HEAD> and </HEAD>. (Replace the 5 with
the number of seconds you want to delay.)
Doesn't work with all browsers, hence the usual "If your browser doesn't
automatically take you, click here" link also found on such pages.
To answer your question, you don't need a script to do what you're asking.
Put this in your page:
<html>
<head>
<title></title>
<meta http-equiv="REFRESH" content="1; url=http://www.new-site.com">
</head>
<body>
</body>
</html>
-------------
content="1 Change the 1 to the # of seconds before moving them.
url=http://www.new-site.com Change to the new site to send to.
That's all. Good Luck.
Beny Spensieri <bernardino...@utoronto.ca> wrote in message
news:36FD1EE7...@utoronto.ca...
> I need a script that will forward a user to another page after a
> few seconds. This is commonly used to send web serfers to the
> new location of a web page that has moved.
>
That answer can be found in the HTTP RFCs. It's not a Perl question,
unless you don't know how to use "print". But that's found in the
manual.
Abigail
--
perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}'
This has nothing to do with Perl. Besides, it's a hack (not part of
the HTML standard) and a hack that only works with certain browsers,
and certain document types. Furthermore, it's slow, because the browser
has to parse the page. On top of that, your browsers/proxies have to do
the same exercise over and over again, each time when going to said URL.
It's better not to use hacks invented by incompetent browers vendors
(like Netscape). Instead, use the HTTP standard.
Followups set.
Abigail
--
perl -we '$_ = q ?4a75737420616e6f74686572205065726c204861636b65720as?;??;
for (??;(??)x??;??)
{??;s;(..)s?;qq ?print chr 0x$1 and \161 ss?;excess;??}'
This is bad. Very bad. A sign of an incompetent author.
See my other posting on this subject.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
The META tag is the only method that allows you to inform the reader that
they're being redirected, and why. It's a perfectly valid use, when
combined with a "click here if your browser doesn't take you there" link.
At any rate, CGI.pm supports this method of refresh/redirection in its
"header" method, as well as the RFC-approved immediate redirect with the
"redirect" method.