Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Baving View Post
    PHP Code:
    <?php
    function redirect($url,$time=0){

    if(!
    headers_sent()){
    header("Location: ".$url);
    }else{
    echo 
    '<meta http-equiv="refresh" content="'.$time.';url='.$url.'" />';
    }

    }
    ?>
    PHP Code:
    <?php
    function redirect$url$time )
    {
        if( !
    headers_sent() AND $time == 0)
        {
            
    header'Location: ' $url );
        }
        else
        {
            echo( 
    '<meta http-equiv="refresh" content="' $time ';url=' $url '" />' );
        }

    }
    ?>
    Would be better.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  2. #12
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Actually it wouldn't, because it's not getting the URL

  3. #13
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Minor View Post
    Actually it wouldn't, because it's not getting the URL
    Yes it is, the $url in the function.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  4. #14
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Could do it in javascript + some PHP.

    PHP Code:
    <html>
        <head>
            <script type="text/javascript">
            var time = 3; // in seconds...
            var urlRedirect = '<?php echo ( $_GET 'url' ] ) ?>';
            var time_redirect = time * 1000;
            
            function checkUrl ()
            {
                // Don't know why we're checking this lawl
                if ( urlRedirect == '' )
                {
                    // Don't do nothing...
                }
                else if ( urlRedirect == 'homepage.php' )
                {
                    // msgbox ( 'You are getting redirected in ' + time + ' seconds...' );
                    document.write( 'You are getting redirected in ' + time + ' seconds...' );
                    setTimeout( 'window.location = "' + urlRedirect + '"', time * 1000 );
                }
                else if ( urlRedirect != '' )
                {
                    // msgbox ( 'You are getting redirected in ' + time + ' seconds...' );
                    document.write( 'You are getting redirected in ' + time + ' seconds...' );
                    setTimeout( 'window.location = "' + urlRedirect + '"', time * 1000 );
                }
            }

            </script>
            <title>Webpage Redirect</title>
        </head>
        <body onLoad="checkUrl();">
        
        </body>
    </html>
    http://www.jamesrozee.com/urlRedirec...//google.co.uk
    Last edited by Protege; 16-06-2008 at 12:54 AM.
    Hi, names James. I am a web developer.

  5. #15
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Nice seeing some code, but all of this seems incredibly pointless to one of simplest things.

    Code:
    You will be directed to the page in [insert time here] seconds.
    <meta http-equiv="refresh" content="[insert time here];[insert link here]" />
    Ooh look, and we didn't need php.

    And echo isn't a function so why on earth would you use parentheses/brackets?

    Must of been a long day.
    How could this hapen to meeeeeeeeeeeeeee?lol.

  6. #16
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Quote Originally Posted by Hypertext View Post
    Nice seeing some code, but all of this seems incredibly pointless to one of simplest things.

    Code:
    You will be directed to the page in [insert time here] seconds.
    <meta http-equiv="refresh" content="[insert time here];[insert link here]" />
    Ooh look, and we didn't need php.

    And echo isn't a function so why on earth would you use parentheses/brackets?

    Must of been a long day.
    How cute, lol.
    Charlie thinking he's smarter than the best coder(s).

  7. #17
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Doesn't matter if you use brackets or not. Its a personal coding preference.

    Quote Originally Posted by Hypertext View Post
    Nice seeing some code, but all of this seems incredibly pointless to one of simplest things.

    Code:
    You will be directed to the page in [insert time here] seconds.
    <meta http-equiv="refresh" content="[insert time here];[insert link here]" />
    Ooh look, and we didn't need php.

    And echo isn't a function so why on earth would you use parentheses/brackets?

    Must of been a long day.
    Last edited by Protege; 16-06-2008 at 08:16 AM.
    Hi, names James. I am a web developer.

  8. #18
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Hypertext View Post
    Nice seeing some code, but all of this seems incredibly pointless to one of simplest things.

    Code:
    You will be directed to the page in [insert time here] seconds.
    <meta http-equiv="refresh" content="[insert time here];[insert link here]" />
    Ooh look, and we didn't need php.

    And echo isn't a function so why on earth would you use parentheses/brackets?

    Must of been a long day.
    I can really see [insert time here] and [insert link here] being variables. Hmm. :eusa_eh:


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  9. #19
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    There doesn't seem any point in using variables. You only need to output the variables once. Invent that wasn't nice.
    How could this hapen to meeeeeeeeeeeeeee?lol.

  10. #20
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Yes, I agree that this script is pretty useless - I'd never use it in all honesty.
    Hi, names James. I am a web developer.

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •