I am using PHP to execute a command using exec() which works fine.
example:
exec("openssl s_client -connect www.domain.com:443 -sslv2 > results.txt");
My question is how can I then read the file "results.txt" and look for certain sentence.. For example if the following exists in the text file:
no peer certificate available
Then return "no results found".
The reason for this is the results.txt may contain alot of data but I don't want to return it all using $getresults = file_get_contents('results.txt');