Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007

    Unanswered: Calling Header Using PHP!

    Hi guys,
    i have asked this question before but never got a perfect i have some sort of script recomemded by some experts but i don't know how to make it work properly.

    What i want!

    First open and you will see everything is loaded fine and the home page data has been loaded in the iframe.

    Now if open body opens this link , it will not open with index.php page which contains all the layout feature.

    i tried using a javacode but that didn't really helped, yeah it only helped me by opening ONLY home.php with the index.php, i was unable to load 100 more pages in different directories in that index.php page though i used the javascript in all pages, it used to load the home.php back when i used to open them using seperate links.

    i asked some and i got this in response but i need more explanation and help that in what page i should insert what code to make this system work.

    These are different codes, tell me which one will help and please do explain how to install.

    A short one
    header('WWW-Authenticate: Negotiate');
    header('WWW-Authenticate: NTLM', false);
    another one


    function redirect($u , $s = 0) {
    if($s < 1)
    header("Location: " . $u);
    function doRefresh() {
    window.location = '{$u}';
    doRefreshTimeout = setTimeout(\"doRefresh()\" , ".($s*1000).");
    <h1>Sind suunatakse...</h1>

    Maybe this will help

    In your server PHP code look at $_SERVER['HTTP_REFERER'] and compare it to the url of the frameset.
    Then use the header function, if necessary to reload page in the frame.

    One of the javascript someone recomemded.

    <script language="javascript" type="text/javascript">
    // 1
    if (top.location == location) {
    // window is loaded directly
    window.location.href = frameset.html;

    // 2
    if (self == top) {
    // window has no parent, loaded directly
    window.location.href = frameset.html;

    // 3
    if (top.location != my_frameset_url) {
    // reload in the frameset
    top.location.href = my_frameset_url;

    a short one

    header("Location:"); /* Redirect browser */

    /* Make sure that code below does not get executed when we redirect. */

    Now please people, tell me which one i should use and how to install them like u can guide me that put this in home and this in index.

    I really need this to be done, its my need..please help would be appreaciated.
    Last edited by ganich; 04-08-07 at 16:10.

  2. #2
    Join Date
    Mar 2007
    It would appear that what you're trying to do is place your home content into the layout of your index (so you can keep you headers etc).
    There are two ways :
    1) Create all the content again in the home page. However, this means you are replicating your content, which is NOT what you are attempting to do.
    2) Seperate everything into its own php files and then call them into your home page and index page.
    The above is a VERY simple way of performing what you want. You do NOT need to redirect your browser. Why are you attempting to redirect? You are looking to replicate something very similar to Master Pages (in ASP.NET).

  3. #3
    Join Date
    Mar 2007
    o man i already knew all of this stuff and reminded of me ot it..THANKS ALOOOOOOOOOOOOOOOOOOOTT

Posting Permissions

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