Ganich18 Posted April 8, 2007 Share Posted April 8, 2007 Hi guys, i have asked this question before but never got a perfect solution..now 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 http://progam3s.com/index.php 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 http://progam3s.com/home.php , 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 <?php header('WWW-Authenticate: Negotiate'); header('WWW-Authenticate: NTLM', false); ?> another one <?php function redirect($u , $s = 0) { session_write_close(); if($s < 1) header("Location: " . $u); exit(" <meta http-equiv=\"refresh\" content=\"{$s};url={$u}\" > <script> function doRefresh() { window.location = '{$u}'; } doRefreshTimeout = setTimeout(\"doRefresh()\" , ".($s*1000)."); </script> <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; } </script> a short one <?php header("Location: http://www.example.com/"); /* Redirect browser */ /* Make sure that code below does not get executed when we redirect. */ exit; ?> 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. Link to comment https://forums.phpfreaks.com/topic/46169-calling-header-using-php/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.