MyBB Community Forums

Full Version: http header refresh and godaddy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys..
I have installed an portal software on one of my friend's site. hosted at godaddy..
the script used header("Refresh: 1;url=" . $url . "")
to redirect whene login logout, etc
but the refresh headers seems not working at godaddy..
so anyone know how to allow it? (thier support looks suck :s)
So you're trying to do a HTTP redirect? Cause the above kinda looks like he's trying to mix a header redirect with a META-REFRESH tag...

Try something like this:
header("Location: $url");
yup I tryed it and it's do the job but without showing the redirect message..
I need something like
header("Location: $url")
sleep (3)// time before done the redirect to show the success form post message or something like that

and here is the full code my that help you to help me
function bodyMsg($msg,$url='')
    {
        $this->url = $url;
        if( $this->url == '' )
        {

            header("Location:" . $this->self  . "");
			
        }
        else
        {
            header("Location:" . $this->url . "");
        }
        
        $this->head($title);
		eval (" print \"" . $this->gettemplate ( 'body_msg' ) . "\";");
        exit;
    }
If you want to show a message, you can't use a header() approach at all.
Output a HTML page with a META REFRESH tag.
yup.. thats true the only way is using meta refresh..
or header("Refesh: but it's not supported for most of web browsers!.

anyway thanks mate for your help..
header("Refresh: url;"); isn't something that a browser does/doesn't support. It's a PHP function and it works fine on all browsers. The only reason why it wouldn't work is if content was already passed to the browser before you've called the header (Headers, have to run before other content is sent to the browser, hence why they call it headers) or if you've got a bug in your code in which it doesn't reach that block (if you've got an if/else statement or the sort that isn't working properly)