0

I am using following code for a refreshing page, it is not reloading on completion. The following code is not working sometime.

$url = array("www.yahoo.com","www.gmail.com");
$go=$url[0];
header("Refresh: 10; URL=$go"); 
Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
Arif Hidayat
  • 67
  • 1
  • 9

1 Answers1

2

"www.yahoo.com" may work in most browsers, but it's not a proper URL without the scheme.

Try http://www.yahoo.com/ etc. instead.

Additionally, redirects via header() are usually done with a Location: header, not a non-standard Refresh:. A refresh is best supported as a meta tag, not a header.

Community
  • 1
  • 1
ceejayoz
  • 176,543
  • 40
  • 303
  • 368