PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $log = "NP 0 00:01:07.533 Trade-ForexEmpire (XAUUSD,H1) 1795780768 message 4710: 2024-08-05 07:01:06+00:00 😠Gold Sell 2429/2428 | | | TP1. 2424 | TP2. 2420 | TP3. 2415 | | | SL . 2436 LJ 0 00:01:07.638 TradeSynchronizer (XAUUSD,H1) Position Opened: 4470550 RR 0 00:01:07.638 TradeSynchronizer (XAUUSD,H1) Sending & Updating the position on the server FO 0 00:01:07.640 Trade-ForexEmpire (XAUUSD,H1) Order was opened: #4470550 Sell 0.30 XAUUSD at 2428.96 sl: 2436.00 tp: 2424.60 MS 0 00:01:07.642 TradeSynchronizer (XAUUSD,H1) Trade sent to the server "; $log = preg_replace("/[\"\']/", '', $log); $lines = explode("\n", $log); $search = 'TradeSynchronizer'; // Store true when the text is found $found = false; foreach($lines as $line) { if(strpos($line, $search) !== false) { $found = true; echo $line; } } // If the text was not found, show a message if(!$found) { echo 'No match found'; }
Show:  
Copy Clear