- /** start.php **/
- <?php
- session_start();
- if (! session_is_registered('n'))
- $_SESSION['n'] = 0;
-
- if ($_SESSION['n'] < 3){
- header ('Refresh: 0, url="sender.php"');
- ?>
- <html>
- <head>
- <script>
- setTimeout(function(){location.reload();},500);
- </script>
- <title></title>
- </head>
- <body>
- Proposition de transfert en cours...
- </body>
- </html>
- <?php
- exit;
- }else{
- session_unregister('n');
- ?>
-
- <?php
- }
- ?>
-
- <html>
- <head>
- <title></title>
- </head>
- <body>
- Proposition Terminée.
- </body>
- </html>
-
- /** sender.php **/
- <?php
- session_start();
- if (! session_is_registered('n'))
- $_SESSION['n'] = 0;
-
- $files = array('test.txt','machin.txt','truc.txt');
- $file = $files[$_SESSION['n']];
-
- $sources = array('test.txt','test.txt','test.txt');
- $source = $sources[$_SESSION['n']];
-
- $_SESSION['n'] ++;
-
- header('Content-Disposition: attachment; filename="'.$file.'"');
- readfile($source);
- ?>
/** start.php **/
<?php
session_start();
if (! session_is_registered('n'))
$_SESSION['n'] = 0;
if ($_SESSION['n'] < 3){
header ('Refresh: 0, url="sender.php"');
?>
<html>
<head>
<script>
setTimeout(function(){location.reload();},500);
</script>
<title></title>
</head>
<body>
Proposition de transfert en cours...
</body>
</html>
<?php
exit;
}else{
session_unregister('n');
?>
<?php
}
?>
<html>
<head>
<title></title>
</head>
<body>
Proposition Terminée.
</body>
</html>
/** sender.php **/
<?php
session_start();
if (! session_is_registered('n'))
$_SESSION['n'] = 0;
$files = array('test.txt','machin.txt','truc.txt');
$file = $files[$_SESSION['n']];
$sources = array('test.txt','test.txt','test.txt');
$source = $sources[$_SESSION['n']];
$_SESSION['n'] ++;
header('Content-Disposition: attachment; filename="'.$file.'"');
readfile($source);
?>