Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    PHP redirecting page


    House
     Share

    Recommended Posts

    Hello,

     

    Now a little tutorial about PHP headers xD

    Headers make you switch to a site with given information.

    You can even slow it down, so it looks professional O.o

     

    First, just open PHP tags...

     

    <?php

     

    Then, write:

    header("location: http://www.letmegoogglethatforyou.com/");
    ?>

     

    Remember: the PHP header function must ALWAYS come before ANY kind of echo "" or html-output! So best it would be like this:

     

    <?php
    
    header("location: http://www.letmegoogglethatforyou.com/");
    
    ?>
    <html>
    <head></head>
    <body></body>
    </html>

     

    ... and so on ;)

     

    If you want to slow a header down, just simply write this:

     

    header("location: http://www.letmegooglethatforyou.com/", 3);

     

    This slows it down for 3 seconds, so you will be redirected in 3 seconds.

     

    So now, go on and annoy people with long redirections, example:

     

    <?php
    
    header("location: http://www.google.de", 999");
    echo "Redirecting in 999 seconds";
    
    ?>

     

    Have fun :D

    Edited by Mastermind Joe™
    Link to comment
    Share on other sites

    • 6 months later...

    i dont want to be a pain, really..

     

    But once ur going to work with dynamic images or sessions.. it gives the error 'Header already sent'.

     

    Just redirect with javascript..

     

    But for the people who dont know how to do it, its good.

    Link to comment
    Share on other sites

    • 4 months later...
    i dont want to be a pain, really..

     

    But once ur going to work with dynamic images or sessions.. it gives the error 'Header already sent'.

     

    Just redirect with javascript..

     

    But for the people who dont know how to do it, its good.

     

    The header function is a perfect method to do this. It would be stupid if you are using JavaScript for this.

    You can also use a meta tag.

     

    Examples:

     

    Place inside <head> to refresh page after 5 seconds:

    <meta http-equiv="refresh" content="5" />

     

    Redirect to http://example.com/ after 5 seconds:

    <meta http-equiv="refresh" content="5;url=http://example.com/" />

     

    Redirect to http://example.com/ immediately:

    <meta http-equiv="refresh" content="0;url=http://example.com/" />

    Edited by Yearupie
    Link to comment
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...