Jump to content

Php refresh


cuds

Recommended Posts

Hi i am trying to get this index.php page to refresh every 60 seconds i am new to php so kind of used the meta tag in header code to do it , what i need to know is if this is right and on loading the other 3 php require_once ("include/functions.php");

require_once ("include/config.php");

require_once ("include/blocks.php");

 

If after 60 seconds it would refresh them for me again

 

Any help would be great

 

Heres the code

 

<?php

 

//  refresh / re-direct to index

//  ———————————

header( ‘refresh: 60; url=http://mysite.com’ );

 

?>

 

<?php

/********

Do not remove the Copyright in footer!

********/

if (file_exists("install.me"))

  {

  if (dirname($_SERVER["PHP_SELF"])=="/" || dirname($_SERVER["PHP_SELF"])=="\\")

      header("Location: http://".$_SERVER["HTTP_HOST"]."/install/");

  else

      header("Location: http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/install/");

  exit;

}

 

require_once ("include/functions.php");

require_once ("include/config.php");

require_once ("include/blocks.php");

 

dbconn(true);

 

standardheader('Index',true,0);

 

center_menu();

 

/*

if (!$CURUSER || $CURUSER["view_torrents"]=="no")

  {

    err_msg(ERROR.NOT_AUTHORIZED." ".MNU_TORRENT."!",SORRY."...");

    stdfoot();

    exit();

}

else

{

*/

  ?>

  <script language="Javascript" type="text/javascript">

 

  <!--

 

  var newwindow;

  function popdetails(url)

  {

    newwindow=window.open(url,'popdetails','height=500,width=500,resizable=yes,scrollbars=yes,status=yes');

    if (window.focus) {newwindow.focus()}

  }

 

  function poppeer(url)

  {

    newwindow=window.open(url,'poppeers','height=400,width=650,resizable=yes,scrollbars=yes');

    if (window.focus) {newwindow.focus()}

  }

 

  // -->

  </script>

 

  <?php

 

//}

 

stdfoot();

 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/86234-php-refresh/
Share on other sites

Wouldnt allow me to modify my post but this is what i would put in the headers in html

<META HTTP-EQUIV="refresh" CONTENT="60">

 

The thing is where would i put it in the above to make it work

 

<?php

/********

Do not remove the Copyright in footer!

********/

if (file_exists("install.me"))

  {

  if (dirname($_SERVER["PHP_SELF"])=="/" || dirname($_SERVER["PHP_SELF"])=="\\")

      header("Location: http://".$_SERVER["HTTP_HOST"]."/install/");

  else

      header("Location: http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/install/");

  exit;

}

 

require_once ("include/functions.php");

require_once ("include/config.php");

require_once ("include/blocks.php");

 

dbconn(true);

 

standardheader('Index',true,0);

 

center_menu();

 

/*

if (!$CURUSER || $CURUSER["view_torrents"]=="no")

  {

    err_msg(ERROR.NOT_AUTHORIZED." ".MNU_TORRENT."!",SORRY."...");

    stdfoot();

    exit();

}

else

{

*/

  ?>

  <script language="Javascript" type="text/javascript">

 

  <!--

 

  var newwindow;

  function popdetails(url)

  {

    newwindow=window.open(url,'popdetails','height=500,width=500,resizable=yes,scrollbars=yes,status=yes');

    if (window.focus) {newwindow.focus()}

  }

 

  function poppeer(url)

  {

    newwindow=window.open(url,'poppeers','height=400,width=650,resizable=yes,scrollbars=yes');

    if (window.focus) {newwindow.focus()}

  }

 

  // -->

  </script>

 

  <?php

 

//}

 

stdfoot();

 

?>

Link to comment
https://forums.phpfreaks.com/topic/86234-php-refresh/#findComment-441421
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.