redirection of URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • breakout
    New Member
    • Jun 2010
    • 1

    #1

    redirection of URL

    We have been using the below code for a long time to be able to call various URLs in an iFrame. For example http://www.BreakOutCreativeCompany.c...?id=122&ln=122 this has worked for years but we recently moved our website from a Linux server to a Windows II7 Server. We know PHP is working because our menus are all built upon PHP and working fine. Can anyone see anything in our code that might be incorrect or can you think of a reason why this code might quite working?

    catframe.php
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <frameset rows="150,71%" cols="*"> 
    <frame src="catframe2.htm" /> 
    <frame src="<?php echo $link ?>" /> 
    </frameset>
    <noframes></noframes> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    
    <body>
    </body>
    </html>
    Last edited by Niheel; Jun 8 '10, 10:49 PM. Reason: Please use code tags to display your code.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    Try replacing "$link" with "$_GET['link']".

    Earlier versions of PHP used to put request variables (GET, POST and COOKIE) directly into the global scope, allowing access to them as normal variables. This was disabled in 4.2, because it posed an inherit security risk to all PHP code. - See the section about register_global s in the manual for more details.

    Also, you should really verify the URLs you are putting into your iframe, otherwise anybody can put any link into the query string of your page, making what appears to be an innocent part of your page link to all manner of nasty things.

    Comment

    Working...