Note that there are some explanatory texts on larger screens.

plurals
  1. POFind specific text until it is found it stops
    text
    copied!<p>I was wondering how to do it, this code will as you know get specific line, now I need it to read until a specific text like 55 and stops reading from there. As you can see the log contains some whitespace so what function can I use to read until the code 55?</p> <p><code>$row['MtID']</code> = A unique ID to specify the line where the result is.</p> <p>So for example the log of the result will be </p> <p>MM3,67624563 (Unique ID (MtID),233262345599,<a href="http://mywebsite.com:8080/web/mm3_pixel.php?sspdata=ams1CIv44qa26LGkchACGKqShLrCtZieSyINNDEuMTkwLjg4LjIwOCgB&amp;vurlid=993211,http://mywebsite.net/sspx?id=69171&amp;sspdata=ams1CIv44qa26LGkchACGKqShLrCtZieSyINNDEuMTkwLjg4LjIwOCgB" rel="nofollow">http://mywebsite.com:8080/web/mm3_pixel.php?sspdata=ams1CIv44qa26LGkchACGKqShLrCtZieSyINNDEuMTkwLjg4LjIwOCgB&amp;vurlid=993211,http://mywebsite.net/sspx?id=69171&amp;sspdata=ams1CIv44qa26LGkchACGKqShLrCtZieSyINNDEuMTkwLjg4LjIwOCgB</a> >> OK ,55</p> <pre><code>$logfile = file("https://myweb.com/Pixel-Full.php?file=".$country."/".$today."-pixel-response.log"); foreach($logfile as $line_num = &gt; $line) { if (strpos($line, $row['MtID']) !== false) { $getresult = strstr(htmlspecialchars($line), 'http://'); echo "&lt;td&gt;".$getresult."&lt;/td&gt;"; } } </code></pre> <p>This system goes like this, a user request something and nothing found, so on our log, it will post the error link requested by user and the error code for us to know what problem it was. So once the system reads the line and continue to read other line as well until it found the code, it stops</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload