How to do a Frame Redirect

Discussion in 'PHP' started by Ripped, Aug 29, 2008.

  1. #1
    Anyone know how to a simple PHP Frame Redirect?
     
    Ripped, Aug 29, 2008 IP
  2. beacon

    beacon Peon

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I know php,
    What 'PHP Frame Redirect' , i don't know (
     
    beacon, Aug 29, 2008 IP
    Ripped likes this.
  3. Ripped

    Ripped Well-Known Member

    Messages:
    2,151
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #3
    It is just a redirect, however the the website which is redirecting is shown in the URL and no the website to which the viewer is redirected.

    Example www.firstpage.com redirects to www.secondpage.com
    When the visitor views the page and navigates through it, www.firstpage.com is shown in the URL form of the browser eventhough he's viewing secondpage.com

    More real examples:
    www*truehypno*com redirects to www*conversational-hypnosis.com

    truehypno just redirects to www.conversational-hypnosis.com , but because it is a frame redirect, when you surf the site, the url stays www*truehypno*com and not www.conversational-hypnosis.com, so you basically don't even know that you're at www.conversational-hypnosis.com

    understand what I'm trying to say?
     
    Ripped, Aug 29, 2008 IP
  4. beacon

    beacon Peon

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok, this understand )
    Example http://www.truehypno.com/index.php:
    
    <html><head></head><frameset rows='100%, *' frameborder=no framespacing=0 border=0>
    <?
    $ifr = <<<FFF
    <frame src="http://clickbank.net" name=mainwindow frameborder=no framespacing=0 marginheight=0 marginwidth=0>
    </frame></frameset>
    FFF;
    echo $fr;
    ?>
    <noframes><h2>Your browser does not support frames.  We recommend 
    upgrading your browser.</h2><br><br><center>Click <a href="http://clickbank.net" >here
    </a> to enter the site.</center></noframes></html>
    Code (markup):
    Why here php ? Only html Enough ...
     
    beacon, Aug 29, 2008 IP
  5. Ripped

    Ripped Well-Known Member

    Messages:
    2,151
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #5
    Thanks a lot man! I'm gonna try that right now!

    Reps for you
     
    Ripped, Aug 29, 2008 IP
  6. Ripped

    Ripped Well-Known Member

    Messages:
    2,151
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #6
    It doesn't quite work, I really suck at coding, but from what I can see you're missing the <body> tag and also shouldn't you echo this line:
    <frame src="http://clickbank.net" name=mainwindow frameborder=no framespacing=0 marginheight=0 marginwidth=0></frame></frameset>

    Because this line is in the php part of the code
     
    Ripped, Aug 29, 2008 IP
  7. Ripped

    Ripped Well-Known Member

    Messages:
    2,151
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #7
    I Got it.. here's how it works


     
    Ripped, Aug 29, 2008 IP
  8. beacon

    beacon Peon

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    i see error, sorry
    change:
    echo $ifr;
     
    beacon, Aug 29, 2008 IP
  9. beacon

    beacon Peon

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    if use tag frame <body> do not need.
     
    beacon, Aug 29, 2008 IP
  10. Ripped

    Ripped Well-Known Member

    Messages:
    2,151
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #10
    Thanks a lot, yeah, you're right I don't need <body> when using a frameset, I got it working now :D
     
    Ripped, Aug 29, 2008 IP