diff --git a/application/third_party/wwwlog/controllers/index.php b/application/third_party/wwwlog/controllers/index.php index e52914b8..cd44f278 100644 --- a/application/third_party/wwwlog/controllers/index.php +++ b/application/third_party/wwwlog/controllers/index.php @@ -56,7 +56,7 @@ class Index extends CI_Controller } echo 'COLI_WebCode:' . $item->COLI_WebCode . ' COLI_ID:' . $item->COLI_ID . ' COLI_SenderIP:' . $item->COLI_SenderIP . '
'; } - echo 'test async v4'; + echo 'test async v5'; } // test @@ -154,12 +154,17 @@ class Index extends CI_Controller //Mozilla/5.0 (Linux; Android 9; SM-G950F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36 X-Middleton/1'; // 匹配clientId的正则表达式 - $pattern = "/YandexId->(.+?)<-YandexId/"; + $yarndexPat = "/YandexId->(.+?)<-YandexId/"; // 检查文本是否匹配正则表达式 - if (preg_match($pattern, $order_text, $matches)) { - $client_id = trim($matches[1]); + if (preg_match($yarndexPat, $order_text, $yandexMatches)) { + $client_id = trim($yandexMatches[1]); } else { - $client_id = "-- Match not found --"; + $gaPat = "/Gaid->(.+?)<-Gaid/"; + if (preg_match($yarndexPat, $order_text, $gaMatches)) { + $client_id = trim($gaMatches[1]); + } else { + $client_id = "-- Match not found --"; + } } // echo $client_id;