1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need some help php / .htacces

Discussion in 'BlackHat Lounge' started by seoweb, Jan 27, 2011.

  1. seoweb

    seoweb Registered Member

    Joined:
    Jan 20, 2009
    Messages:
    56
    Likes Received:
    2
    Location:
    Romania (at the end of world...)
    i have two pages: A and B (.php)

    in A i have

    <IFRAME SRC="mov/b.php" >
    </IFRAME>

    in B i have some functions.

    facts: is a necessity to have that iframe

    problem: i need to block direct acces(visitors) to mov/b.php but in the same time i need the page B to work for me.
    I need that page to work only when in used in page A (in the iframe) and to have it block for other use.

    How do i do that? Can somebody help? I can't figure it out by myself.

    Thank you!
     
  2. BugFixed

    BugFixed Junior Member

    Joined:
    Sep 24, 2010
    Messages:
    130
    Likes Received:
    39
    You can do it by checking referrer in file B.
    Or by creating session in file A then, check that session in file B, if it doesn't match, redirect to file A.
     
    • Thanks Thanks x 1
  3. seoweb

    seoweb Registered Member

    Joined:
    Jan 20, 2009
    Messages:
    56
    Likes Received:
    2
    Location:
    Romania (at the end of world...)
    i will try "You can do it by checking referrer in file B."

    "Or by creating session in file A then, check that session in file B, if it doesn't match, redirect to file A." the problem is if the user has A open then the seesion will work for B (i think not sure... i will check)

    i have a java script, but java can be stoped and my script won't work anymore:

    var isInIFrame = (window.location != window.parent.location) ? true : false;
    if(!isInIFrame) {
    window.location = "../index.php";
    }

    thank you!