Jump to content

Recommended Posts

I am trying use php to search my mail info log for email addresses to try and stay away from having to create user accounts on the system.

My problem is that I want to have the results show up on new lines, without <PRE> I can not seem to figure out how to do that, everything just splatters on the screen. The problem with <PRE> is that the output is all on one line but its a mile long. How can I get it to wrap nicely?

[code]      

if (validate_email($_POST['email']))
        {
         echo "Checking <b>/var/log/mail/info!</b><br><br/>";
        echo "<PRE>";
        $outcome = sys_tem("sudo /usr/bin/tac /var/log/mail/info |grep -i ".$_POST['email']."", $results);
        foreach ($results as $result) echo $result;
        echo "</PRE>";
        }
[/code]
Link to comment
https://forums.phpfreaks.com/topic/12387-sys_tem/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.