Re: [PHP] php redirection..

2006-12-18 Thread Richard Lynch
On Sat, December 16, 2006 5:58 am, Stut wrote:
 Casey Chu wrote:
 Well... They skip all  !-- --'s, so they skip script!--
 //--/script's.

 And you *know* this how?

 They may well skip comments in terms of what content actually gets
 indexed, but I would expect their indexer is smart enough to parse
 HTML
 comments in a script block as though it were not in an HTML comment
 because that's what a browser does. What they actually do with that
 content - execute it, or just analyze it, or whatever - we don't know.

 You can't make sweeping statements like that unless you can back it up
 with at least one reference, preferably official.

... and current, as the search engine algorithms change even faster
than Internet speeds.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-18 Thread Richard Lynch
On Mon, December 18, 2006 12:08 am, Chris Shiflett wrote:
 Richard Lynch wrote:
 The old school HTTP-EQUIV of a refresh with a time and URL
 would probably be suitable for this.

 YMMV

 And it's still not PHP. :-)

 It is if you use header(). :-)

You mean Refresh is a real header?

I always thought it was just some made-up poor-man's hack for a
not-quite Location:  header, and it never really existed in its own
right as a real header.

Learn something every day.

'Course Wikipedia and W3C indicate that it's proprietary and
discourage its use, but, hey, there ya go.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-18 Thread Chris Shiflett
Richard Lynch wrote:
 You mean Refresh is a real header?

Yeah, although if I remember correctly, the W3C really dislikes people
using it for redirection instead of just refreshing the current URL. If
that's the case, however, why can we indicate the URL at all? :-)

A few years ago, someone conducted some pretty extensive research into
browser support for Refresh. I can't seem to find the URL, but the
results demonstrated extremely widespread support. (I can't imagine
support for a real HTTP header being poorer than support for the same
header expressed as http-equiv.)

Anyway, it's as real as Content-Disposition. :-)

Chris

-- 
Chris Shiflett
http://shiflett.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-17 Thread Chris Shiflett
Tim wrote:
 Considering bruce wants to be able to display the data and then
 change location after a given time, and as stut said you can't
 do this with a header() as it redirects before output

Sure you can. Just use a Refresh header instead of Location.

Chris

-- 
Chris Shiflett
http://shiflett.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-17 Thread Chris Shiflett
Richard Lynch wrote:
 The old school HTTP-EQUIV of a refresh with a time and URL
 would probably be suitable for this.
 
 YMMV
 
 And it's still not PHP. :-)

It is if you use header(). :-)

Chris

-- 
Chris Shiflett
http://shiflett.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-16 Thread Stut

Casey Chu wrote:
Well... They skip all  !-- --'s, so they skip script!-- 
//--/script's.


And you *know* this how?

They may well skip comments in terms of what content actually gets 
indexed, but I would expect their indexer is smart enough to parse HTML 
comments in a script block as though it were not in an HTML comment 
because that's what a browser does. What they actually do with that 
content - execute it, or just analyze it, or whatever - we don't know.


You can't make sweeping statements like that unless you can back it up 
with at least one reference, preferably official.


-Stut


On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote:

On Fri, December 15, 2006 10:28 pm, Casey Chu wrote:
 Actually... Search engines don't have a JavaScript interpreter.

Actually...

You don't know for sure that Google isn't using Perl's javascript
interpreter.

Unless you work for Google, have just told us something they would
consider double-secret proprietary, and are about to get fired.
:-) :-) :-)

It would not be Rocket Science for a search engine to execute the
javascript on a page in a sandbox, to analyze it for abuses, viruses,
and other things they wanted to take away points for.

I know I could almost manage that with a ton of work.

And I figure the Google engineers are probably a heck of a lot smarter
than I am, and for sure they are way more experienced.

So I'm going to assume that any dodge in JS I could come up with to
game their system, will be detected and defeated as soon as they want
to bother doing that.

But, hey, feel free to get Google to issue a statement that they do
not now nor ever will check the JS on sites as they index them, and
point to it as a reference.
:-)

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
The old school HTTP-EQUIV of a refresh with a time and URL would
probably be suitable for this.

YMMV

And it's still not PHP. :-)

On Thu, December 14, 2006 11:08 am, bruce wrote:
 all these are solid posts...

 however, the original posting, was not to do a redirect on the page
 being
 presented.

 the original post, was to display some content rolling down the page,
 wait
 some time, and 'then' redirect the user to another page. i wanted to
 be able
 to accomplish this without having the user hitting some 'submit'
 button.

 thanks!


 -Original Message-
 From: Brad Fuller [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 8:40 AM
 To: 'PHP General List'
 Subject: RE: [PHP] php redirection..



 Better to do this on the client side with JS

 html
 head
 titleRedirect Test/title
 script language=JavaScript
 function redirect() {
   location.href='http://www.google.com/';
 }
 /script
 /head
 body onLoad=setTimeout('redirect()', 3000);
 pYou will be redirected in 3 seconds.../p
 /body
 /html


 -Original Message-
 From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 10:44 AM
 To: PHP General List
 Subject: Re: [PHP] php redirection..

 Budi Setiawan wrote:
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
 
 
  Hi , im a new too..
 
  but you can try with this to delay your script running for some
 seconds
 :
  echo  test contentbr
  echo  more test contentbr
 
  // you can add :
  sleep(2);
  // this will cause your script delayed for 2 seconds
 
  //redirect user
  echo
  script
  location.href='foo.php';
  /script
  ;
 

 This would work providing you don't use output buffering, otherwise
 the
 user won't see any data whatsoever that has been sent prior to the
 sleep() call.

 
  // hhaha..
  // im just trying to help...
  //
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 12:51 pm, Stut wrote:
 bruce wrote:
 hey stut...

 Please don't reply to me directly, always include the mailing list.

 thanks for the reply... i did get some output...

 i also have a question as to why i couldn't get it to work when i
 used
 'header (foo.php)'

 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.

You actually need to put in an exit; if you want to guarantee that PHP
won't send more data, and that the browser won't process it and show
it before doing the re-direct...

*MOST* of the time the Location: header gets processed so fast, you
don't see any following data, but if you pound on it enough, you'll
see that the browser *can* show the data after the re-direct, if it
feels particularly Orange at that moment in time.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Wed, December 13, 2006 9:41 pm, Casey Chu wrote:
 Search Engines don't like the META tag.

 Use

 scriptlocation.href='foobar.php';/scripta href='foobar.php'Foo
 Bar/a

If the search engine authors are not smart enough to make the META tag
and this JS snippet the same in their evaluation of the page, maybe
that search engine is a pretty bad one...

I don't *KNOW* but I suspect that the search engines care equally
about the META re-direct and a JS re-direct, if the search engines are
any good at what they do.

We already have enough mis-information, mostly just out-dated
information, about search engines.  Let's either provide references or
be clear that we are only guessing.

I'm only guessing.
:-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-15 Thread Casey Chu

Actually... Search engines don't have a JavaScript interpreter.

On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote:

On Tue, December 12, 2006 12:51 pm, Stut wrote:
 bruce wrote:
 hey stut...

 Please don't reply to me directly, always include the mailing list.

 thanks for the reply... i did get some output...

 i also have a question as to why i couldn't get it to work when i
 used
 'header (foo.php)'

 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.

You actually need to put in an exit; if you want to guarantee that PHP
won't send more data, and that the browser won't process it and show
it before doing the re-direct...

*MOST* of the time the Location: header gets processed so fast, you
don't see any following data, but if you pound on it enough, you'll
see that the browser *can* show the data after the re-direct, if it
feels particularly Orange at that moment in time.

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 10:28 pm, Casey Chu wrote:
 Actually... Search engines don't have a JavaScript interpreter.

Actually...

You don't know for sure that Google isn't using Perl's javascript
interpreter.

Unless you work for Google, have just told us something they would
consider double-secret proprietary, and are about to get fired.
:-) :-) :-)

It would not be Rocket Science for a search engine to execute the
javascript on a page in a sandbox, to analyze it for abuses, viruses,
and other things they wanted to take away points for.

I know I could almost manage that with a ton of work.

And I figure the Google engineers are probably a heck of a lot smarter
than I am, and for sure they are way more experienced.

So I'm going to assume that any dodge in JS I could come up with to
game their system, will be detected and defeated as soon as they want
to bother doing that.

But, hey, feel free to get Google to issue a statement that they do
not now nor ever will check the JS on sites as they index them, and
point to it as a reference.
:-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-15 Thread Casey Chu

Well... They skip all  !-- --'s, so they skip script!-- //--/script's.

On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote:

On Fri, December 15, 2006 10:28 pm, Casey Chu wrote:
 Actually... Search engines don't have a JavaScript interpreter.

Actually...

You don't know for sure that Google isn't using Perl's javascript
interpreter.

Unless you work for Google, have just told us something they would
consider double-secret proprietary, and are about to get fired.
:-) :-) :-)

It would not be Rocket Science for a search engine to execute the
javascript on a page in a sandbox, to analyze it for abuses, viruses,
and other things they wanted to take away points for.

I know I could almost manage that with a ton of work.

And I figure the Google engineers are probably a heck of a lot smarter
than I am, and for sure they are way more experienced.

So I'm going to assume that any dodge in JS I could come up with to
game their system, will be detected and defeated as soon as they want
to bother doing that.

But, hey, feel free to get Google to issue a statement that they do
not now nor ever will check the JS on sites as they index them, and
point to it as a reference.
:-)

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-14 Thread bruce
bud...

if you try to use the 'sleep' function, you'll discover it doesn't
effectively wait... ie, it's not waiting a specified period of time, prior
to invoking the jscript location.href.

remember, sleep is server side, jscript is client side. i haven't thoroughly
tested this, but i imagine that this acts in a similar manner to the
'header' function as well...



-Original Message-
From: Budi Setiawan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 13, 2006 9:33 PM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] php redirection..


 basically:

 cat.php
  -echo  test contentbr
  -echo  more test contentbr

 //redirect user
  echo
   script
 location.href='foo.php';
   /script
  ;



Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo  test contentbr
echo  more test contentbr

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo
script
location.href='foo.php';
/script
;




// hhaha..
// im just trying to help...
//

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-14 Thread Youri LACAN-BARTLEY
Budi Setiawan wrote:
 basically:

 cat.php
  -echo  test contentbr
  -echo  more test contentbr

 //redirect user
  echo
   script
 location.href='foo.php';
   /script
  ;

 
 
 Hi , im a new too..
 
 but you can try with this to delay your script running for some seconds :
 echo  test contentbr
 echo  more test contentbr
 
 // you can add :
 sleep(2);
 // this will cause your script delayed for 2 seconds
 
 //redirect user
 echo
 script
 location.href='foo.php';
 /script
 ;
 

This would work providing you don't use output buffering, otherwise the
user won't see any data whatsoever that has been sent prior to the
sleep() call.

 
 // hhaha..
 // im just trying to help...
 //
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-14 Thread Brad Fuller

Better to do this on the client side with JS

html
head
titleRedirect Test/title
script language=JavaScript
function redirect() {
location.href='http://www.google.com/';
}
/script
/head
body onLoad=setTimeout('redirect()', 3000);
pYou will be redirected in 3 seconds.../p
/body
/html


 -Original Message-
 From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 10:44 AM
 To: PHP General List
 Subject: Re: [PHP] php redirection..
 
 Budi Setiawan wrote:
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
 
 
  Hi , im a new too..
 
  but you can try with this to delay your script running for some seconds
 :
  echo  test contentbr
  echo  more test contentbr
 
  // you can add :
  sleep(2);
  // this will cause your script delayed for 2 seconds
 
  //redirect user
  echo
  script
  location.href='foo.php';
  /script
  ;
 
 
 This would work providing you don't use output buffering, otherwise the
 user won't see any data whatsoever that has been sent prior to the
 sleep() call.
 
 
  // hhaha..
  // im just trying to help...
  //
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-14 Thread bruce
all these are solid posts...

however, the original posting, was not to do a redirect on the page being
presented.

the original post, was to display some content rolling down the page, wait
some time, and 'then' redirect the user to another page. i wanted to be able
to accomplish this without having the user hitting some 'submit' button.

thanks!


-Original Message-
From: Brad Fuller [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 14, 2006 8:40 AM
To: 'PHP General List'
Subject: RE: [PHP] php redirection..



Better to do this on the client side with JS

html
head
titleRedirect Test/title
script language=JavaScript
function redirect() {
location.href='http://www.google.com/';
}
/script
/head
body onLoad=setTimeout('redirect()', 3000);
pYou will be redirected in 3 seconds.../p
/body
/html


 -Original Message-
 From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 10:44 AM
 To: PHP General List
 Subject: Re: [PHP] php redirection..

 Budi Setiawan wrote:
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
 
 
  Hi , im a new too..
 
  but you can try with this to delay your script running for some seconds
 :
  echo  test contentbr
  echo  more test contentbr
 
  // you can add :
  sleep(2);
  // this will cause your script delayed for 2 seconds
 
  //redirect user
  echo
  script
  location.href='foo.php';
  /script
  ;
 

 This would work providing you don't use output buffering, otherwise the
 user won't see any data whatsoever that has been sent prior to the
 sleep() call.

 
  // hhaha..
  // im just trying to help...
  //
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-14 Thread Brad Fuller
 -Original Message-
 From: bruce [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 12:08 PM
 To: 'Brad Fuller'; 'PHP General List'
 Subject: RE: [PHP] php redirection..
 
 all these are solid posts...
 
 however, the original posting, was not to do a redirect on the page being
 presented.
 
 the original post, was to display some content rolling down the page, wait
 some time, and 'then' redirect the user to another page. i wanted to be
 able
 to accomplish this without having the user hitting some 'submit' button.


Uhhh... what do you think setTimeout() does?

Did you even look at the code, let alone test it?  


 thanks!
 
 
 -Original Message-
 From: Brad Fuller [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 14, 2006 8:40 AM
 To: 'PHP General List'
 Subject: RE: [PHP] php redirection..
 
 
 
 Better to do this on the client side with JS
 
 html
 head
 titleRedirect Test/title
 script language=JavaScript
 function redirect() {
   location.href='http://www.google.com/';
 }
 /script
 /head
 body onLoad=setTimeout('redirect()', 3000);
 pYou will be redirected in 3 seconds.../p
 /body
 /html
 
 
  -Original Message-
  From: Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
  Sent: Thursday, December 14, 2006 10:44 AM
  To: PHP General List
  Subject: Re: [PHP] php redirection..
 
  Budi Setiawan wrote:
   basically:
  
   cat.php
-echo  test contentbr
-echo  more test contentbr
  
   //redirect user
echo
 script
   location.href='foo.php';
 /script
;
  
  
  
   Hi , im a new too..
  
   but you can try with this to delay your script running for some
 seconds
  :
   echo  test contentbr
   echo  more test contentbr
  
   // you can add :
   sleep(2);
   // this will cause your script delayed for 2 seconds
  
   //redirect user
   echo
   script
   location.href='foo.php';
   /script
   ;
  
 
  This would work providing you don't use output buffering, otherwise the
  user won't see any data whatsoever that has been sent prior to the
  sleep() call.
 
  
   // hhaha..
   // im just trying to help...
   //
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-13 Thread Youri LACAN-BARTLEY

Tim wrote:
 Just a quick question regarding this issue.
 
 Considering bruce wants to be able to display the data and then change
 location after a given time, and as stut said you can't do this with a
 header() as it redirects before output, I would have imagined a dynamic meta
 tag in the header with a time variable and a location variable.
 
 But then I wonder what affect this has regards to html standards? 
 Are dynamic meta tags depreciated?

What exactly do you have in mind when you mention dynamic meta tags?
Do you just mean using a meta refresh tag?

meta http-equiv=refresh content=2;url=http://www.example.com;

I believe that would be the best solution to Bruce's problem.
This meta tag can be used on the page with the information to be shown
and automatically redirected to the URL specified in the tag after n
seconds. In the above example, redirection to www.example.com will
happen after 2 seconds.

Good luck Bruce

 
 Regards,
 Tim
 
 -Message d'origine-
 De : Stut [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 12 décembre 2006 19:52
 À : [EMAIL PROTECTED]
 Cc : php
 Objet : Re: [PHP] php redirection..

 bruce wrote:
 hey stut...
 Please don't reply to me directly, always include the mailing list.

 thanks for the reply... i did get some output...

 i also have a question as to why i couldn't get it to work when i used
 'header (foo.php)'
 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.

 i did a 'ob_end_flush()' at the start, followed by a 'header()' at the
 end,
 but the header didn't seem to function as i though it should.
 I suggest you read about the header function in the manual
 (http://php.net/header) - you clearly don't have any idea what it does.

 given that the ultimate information that i'm going to want to display
 will
 be dynamic. some times it might be 5 lines, others 100, others 50...

 i had hoped that i could somehow display the content, wait a few
 seconds,
 and then do an auto redirect...
 Like I said in my first reply, Google for the Javascript function
 settimeout - that's what you need.

 any thoughts/comments...
 I have lots of comments. Thoughts are less common but they do
 occasionally happen.

 -Stut

 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 12, 2006 9:21 AM
 To: [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] php redirection..


 bruce wrote:
 i want to be able to display some text/content and to then redirect the
 user
 to another page.

 basically:

 cat.php
  -echo  test contentbr
  -echo  more test contentbr

 //redirect user
  echo
   script
 location.href='foo.php';
   /script
  ;

 ---
 foo.php
  -echo i'm here


 should be pretty simple...

 however, in my test, without the script/location.href i display the
 content
 ok. when i add the script/location.href, i get redirected, but the
 content
 is never displayed...

 any thoughts/samples/pointers on what might be going on, and how this
 should
 really be accomplished..

 to be honest, i'm embarrassed to even be raising this here!!
 And so you should be what with it being a Javascript question and this
 being a PHP list.

 Anyhoo, I don't get your confusion. The browser will run the script as
 it loads it from your site. Ergo, it redirects before it displays what
 you have output. I suggest you Google for examples of the settimeout
 Javscript function - that's what you need to delay the redirect.

 -Stut

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-13 Thread Tim
 -Message d'origine-
 De : Youri LACAN-BARTLEY [mailto:[EMAIL PROTECTED]
 Envoyé : mercredi 13 décembre 2006 09:09
 Cc : 'php'
 Objet : Re: [PHP] php redirection..
 
 
 Tim wrote:
  Just a quick question regarding this issue.
 
  Considering bruce wants to be able to display the data and then change
  location after a given time, and as stut said you can't do this with a
  header() as it redirects before output, I would have imagined a dynamic
 meta
  tag in the header with a time variable and a location variable.
 
  But then I wonder what affect this has regards to html standards?
  Are dynamic meta tags depreciated?
 
 What exactly do you have in mind when you mention dynamic meta tags?
 Do you just mean using a meta refresh tag?
 
Yes I meant just using a meta refresh tag with php variables to make it more
flexible:

echo 'meta http-equiv=refresh content=' . $time . ';url=' . $url . '';

I modify meta title/content this way aswell. 

 meta http-equiv=refresh content=2;url=http://www.example.com;
 
 I believe that would be the best solution to Bruce's problem.
 This meta tag can be used on the page with the information to be shown
 and automatically redirected to the URL specified in the tag after n
 seconds. In the above example, redirection to www.example.com will
 happen after 2 seconds.
 
 Good luck Bruce
 
 
  Regards,
  Tim
 
  -Message d'origine-
  De : Stut [mailto:[EMAIL PROTECTED]
  Envoyé : mardi 12 décembre 2006 19:52
  À : [EMAIL PROTECTED]
  Cc : php
  Objet : Re: [PHP] php redirection..
 
  bruce wrote:
  hey stut...
  Please don't reply to me directly, always include the mailing list.
 
  thanks for the reply... i did get some output...
 
  i also have a question as to why i couldn't get it to work when i used
  'header (foo.php)'
  1) The correct way to redirect using the header function is
  header('Location: http://domain.com/foo.php'); Note the absolute URL.
  2) Using header will definitely not display any output from the page.
 
  i did a 'ob_end_flush()' at the start, followed by a 'header()' at the
  end,
  but the header didn't seem to function as i though it should.
  I suggest you read about the header function in the manual
  (http://php.net/header) - you clearly don't have any idea what it does.
 
  given that the ultimate information that i'm going to want to display
  will
  be dynamic. some times it might be 5 lines, others 100, others 50...
 
  i had hoped that i could somehow display the content, wait a few
  seconds,
  and then do an auto redirect...
  Like I said in my first reply, Google for the Javascript function
  settimeout - that's what you need.
 
  any thoughts/comments...
  I have lots of comments. Thoughts are less common but they do
  occasionally happen.
 
  -Stut
 
  -Original Message-
  From: Stut [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 12, 2006 9:21 AM
  To: [EMAIL PROTECTED]
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] php redirection..
 
 
  bruce wrote:
  i want to be able to display some text/content and to then redirect
 the
  user
  to another page.
 
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
  ---
  foo.php
   -echo i'm here
 
 
  should be pretty simple...
 
  however, in my test, without the script/location.href i display the
  content
  ok. when i add the script/location.href, i get redirected, but the
  content
  is never displayed...
 
  any thoughts/samples/pointers on what might be going on, and how this
  should
  really be accomplished..
 
  to be honest, i'm embarrassed to even be raising this here!!
  And so you should be what with it being a Javascript question and this
  being a PHP list.
 
  Anyhoo, I don't get your confusion. The browser will run the script as
  it loads it from your site. Ergo, it redirects before it displays what
  you have output. I suggest you Google for examples of the settimeout
  Javscript function - that's what you need to delay the redirect.
 
  -Stut
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-13 Thread tedd

At 9:02 PM +0100 12/12/06, Tim wrote:

Just a quick question regarding this issue.

Considering bruce wants to be able to display the data and then change
location after a given time, and as stut said you can't do this with a
header() as it redirects before output, I would have imagined a dynamic meta
tag in the header with a time variable and a location variable.



Why not use the standard meta refresh tag? It's worked for me before.

tedd

PS:

I have lots of comments. Thoughts are less common but they do 
occasionally happen.


-Stut



LOL
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-13 Thread Casey Chu

Search Engines don't like the META tag.

Use

scriptlocation.href='foobar.php';/scripta href='foobar.php'Foo Bar/a

On 12/13/06, tedd [EMAIL PROTECTED] wrote:

At 9:02 PM +0100 12/12/06, Tim wrote:
Just a quick question regarding this issue.

Considering bruce wants to be able to display the data and then change
location after a given time, and as stut said you can't do this with a
header() as it redirects before output, I would have imagined a dynamic meta
tag in the header with a time variable and a location variable.


Why not use the standard meta refresh tag? It's worked for me before.

tedd

PS:

I have lots of comments. Thoughts are less common but they do
occasionally happen.

-Stut


LOL
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-13 Thread Budi Setiawan

basically:

cat.php
 -echo  test contentbr
 -echo  more test contentbr

//redirect user
 echo
  script
location.href='foo.php';
  /script
 ;




Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo  test contentbr
echo  more test contentbr

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo
script
location.href='foo.php';
/script
;




// hhaha..
// im just trying to help...
//

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-13 Thread Casey Chu

It's usually OK if it's 8 seconds or more, but that would take too long.

See here for info:
http://www.netmechanic.com/news/vol4/promo_no15.htm

On 12/13/06, Budi Setiawan [EMAIL PROTECTED] wrote:

 basically:

 cat.php
  -echo  test contentbr
  -echo  more test contentbr

 //redirect user
  echo
   script
 location.href='foo.php';
   /script
  ;



Hi , im a new too..

but you can try with this to delay your script running for some seconds :
echo  test contentbr
echo  more test contentbr

// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds

//redirect user
echo
script
location.href='foo.php';
/script
;




// hhaha..
// im just trying to help...
//

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php redirection..

2006-12-12 Thread bruce
hi...

i have what should be a pretty simple question that i'm obviously missing
something for...

i want to be able to display some text/content and to then redirect the user
to another page.

basically:

cat.php
 -echo  test contentbr
 -echo  more test contentbr

//redirect user
 echo
  script
location.href='foo.php';
  /script
 ;

---
foo.php
 -echo i'm here


should be pretty simple...

however, in my test, without the script/location.href i display the content
ok. when i add the script/location.href, i get redirected, but the content
is never displayed...

any thoughts/samples/pointers on what might be going on, and how this should
really be accomplished..

to be honest, i'm embarrassed to even be raising this here!!

thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-12 Thread Stut

bruce wrote:

i want to be able to display some text/content and to then redirect the user
to another page.

basically:

cat.php
 -echo  test contentbr
 -echo  more test contentbr

//redirect user
 echo
  script
location.href='foo.php';
  /script
 ;

---
foo.php
 -echo i'm here


should be pretty simple...

however, in my test, without the script/location.href i display the content
ok. when i add the script/location.href, i get redirected, but the content
is never displayed...

any thoughts/samples/pointers on what might be going on, and how this should
really be accomplished..

to be honest, i'm embarrassed to even be raising this here!!


And so you should be what with it being a Javascript question and this 
being a PHP list.


Anyhoo, I don't get your confusion. The browser will run the script as 
it loads it from your site. Ergo, it redirects before it displays what 
you have output. I suggest you Google for examples of the settimeout 
Javscript function - that's what you need to delay the redirect.


-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php redirection..

2006-12-12 Thread Stut

bruce wrote:

hey stut...


Please don't reply to me directly, always include the mailing list.


thanks for the reply... i did get some output...

i also have a question as to why i couldn't get it to work when i used
'header (foo.php)'


1) The correct way to redirect using the header function is 
header('Location: http://domain.com/foo.php'); Note the absolute URL.

2) Using header will definitely not display any output from the page.


i did a 'ob_end_flush()' at the start, followed by a 'header()' at the end,
but the header didn't seem to function as i though it should.


I suggest you read about the header function in the manual 
(http://php.net/header) - you clearly don't have any idea what it does.



given that the ultimate information that i'm going to want to display will
be dynamic. some times it might be 5 lines, others 100, others 50...

i had hoped that i could somehow display the content, wait a few seconds,
and then do an auto redirect...


Like I said in my first reply, Google for the Javascript function 
settimeout - that's what you need.



any thoughts/comments...


I have lots of comments. Thoughts are less common but they do 
occasionally happen.


-Stut


-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 12, 2006 9:21 AM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] php redirection..


bruce wrote:

i want to be able to display some text/content and to then redirect the

user

to another page.

basically:

cat.php
 -echo  test contentbr
 -echo  more test contentbr

//redirect user
 echo
  script
location.href='foo.php';
  /script
 ;

---
foo.php
 -echo i'm here


should be pretty simple...

however, in my test, without the script/location.href i display the

content

ok. when i add the script/location.href, i get redirected, but the content
is never displayed...

any thoughts/samples/pointers on what might be going on, and how this

should

really be accomplished..

to be honest, i'm embarrassed to even be raising this here!!


And so you should be what with it being a Javascript question and this
being a PHP list.

Anyhoo, I don't get your confusion. The browser will run the script as
it loads it from your site. Ergo, it redirects before it displays what
you have output. I suggest you Google for examples of the settimeout
Javscript function - that's what you need to delay the redirect.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-12 Thread Tim
Just a quick question regarding this issue.

Considering bruce wants to be able to display the data and then change
location after a given time, and as stut said you can't do this with a
header() as it redirects before output, I would have imagined a dynamic meta
tag in the header with a time variable and a location variable.

But then I wonder what affect this has regards to html standards? 
Are dynamic meta tags depreciated?

Regards,
Tim

 -Message d'origine-
 De : Stut [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 12 décembre 2006 19:52
 À : [EMAIL PROTECTED]
 Cc : php
 Objet : Re: [PHP] php redirection..
 
 bruce wrote:
  hey stut...
 
 Please don't reply to me directly, always include the mailing list.
 
  thanks for the reply... i did get some output...
 
  i also have a question as to why i couldn't get it to work when i used
  'header (foo.php)'
 
 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.
 
  i did a 'ob_end_flush()' at the start, followed by a 'header()' at the
 end,
  but the header didn't seem to function as i though it should.
 
 I suggest you read about the header function in the manual
 (http://php.net/header) - you clearly don't have any idea what it does.
 
  given that the ultimate information that i'm going to want to display
 will
  be dynamic. some times it might be 5 lines, others 100, others 50...
 
  i had hoped that i could somehow display the content, wait a few
 seconds,
  and then do an auto redirect...
 
 Like I said in my first reply, Google for the Javascript function
 settimeout - that's what you need.
 
  any thoughts/comments...
 
 I have lots of comments. Thoughts are less common but they do
 occasionally happen.
 
 -Stut
 
  -Original Message-
  From: Stut [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 12, 2006 9:21 AM
  To: [EMAIL PROTECTED]
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] php redirection..
 
 
  bruce wrote:
  i want to be able to display some text/content and to then redirect the
  user
  to another page.
 
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
  ---
  foo.php
   -echo i'm here
 
 
  should be pretty simple...
 
  however, in my test, without the script/location.href i display the
  content
  ok. when i add the script/location.href, i get redirected, but the
 content
  is never displayed...
 
  any thoughts/samples/pointers on what might be going on, and how this
  should
  really be accomplished..
 
  to be honest, i'm embarrassed to even be raising this here!!
 
  And so you should be what with it being a Javascript question and this
  being a PHP list.
 
  Anyhoo, I don't get your confusion. The browser will run the script as
  it loads it from your site. Ergo, it redirects before it displays what
  you have output. I suggest you Google for examples of the settimeout
  Javscript function - that's what you need to delay the redirect.
 
  -Stut
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php redirection..

2006-12-12 Thread Tim
Just a quick question regarding this issue.

Considering bruce wants to be able to display the data and then change
location after a given time, and as stut said you can't do this with a
header() as it redirects before output, I would have imagined a dynamic meta
tag in the header with a time variable and a location variable.

But then I wonder what affect this has regards to html standards? 
Are dynamic meta tags depreciated?

Regards,
Tim

 -Message d'origine-
 De : Stut [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 12 décembre 2006 19:52
 À : [EMAIL PROTECTED]
 Cc : php
 Objet : Re: [PHP] php redirection..
 
 bruce wrote:
  hey stut...
 
 Please don't reply to me directly, always include the mailing list.
 
  thanks for the reply... i did get some output...
 
  i also have a question as to why i couldn't get it to work when i used
  'header (foo.php)'
 
 1) The correct way to redirect using the header function is
 header('Location: http://domain.com/foo.php'); Note the absolute URL.
 2) Using header will definitely not display any output from the page.
 
  i did a 'ob_end_flush()' at the start, followed by a 'header()' at the
 end,
  but the header didn't seem to function as i though it should.
 
 I suggest you read about the header function in the manual
 (http://php.net/header) - you clearly don't have any idea what it does.
 
  given that the ultimate information that i'm going to want to display
 will
  be dynamic. some times it might be 5 lines, others 100, others 50...
 
  i had hoped that i could somehow display the content, wait a few
 seconds,
  and then do an auto redirect...
 
 Like I said in my first reply, Google for the Javascript function
 settimeout - that's what you need.
 
  any thoughts/comments...
 
 I have lots of comments. Thoughts are less common but they do
 occasionally happen.
 
 -Stut
 
  -Original Message-
  From: Stut [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 12, 2006 9:21 AM
  To: [EMAIL PROTECTED]
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] php redirection..
 
 
  bruce wrote:
  i want to be able to display some text/content and to then redirect the
  user
  to another page.
 
  basically:
 
  cat.php
   -echo  test contentbr
   -echo  more test contentbr
 
  //redirect user
   echo
script
  location.href='foo.php';
/script
   ;
 
  ---
  foo.php
   -echo i'm here
 
 
  should be pretty simple...
 
  however, in my test, without the script/location.href i display the
  content
  ok. when i add the script/location.href, i get redirected, but the
 content
  is never displayed...
 
  any thoughts/samples/pointers on what might be going on, and how this
  should
  really be accomplished..
 
  to be honest, i'm embarrassed to even be raising this here!!
 
  And so you should be what with it being a Javascript question and this
  being a PHP list.
 
  Anyhoo, I don't get your confusion. The browser will run the script as
  it loads it from your site. Ergo, it redirects before it displays what
  you have output. I suggest you Google for examples of the settimeout
  Javscript function - that's what you need to delay the redirect.
 
  -Stut
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Redirection If Login Fails.

2004-07-09 Thread Harlequin
Hi all I've created a page that allows registered users who have previously
registered and been entered into the database to login. However, for some
reason if a user login fails my code does not display the appropriate error
message.

Ideally I would like the users to be redirected to another page rather than
the login page if they fail but I need some help with the code.

Anyone...?

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php