Real Time PHP script for ngrep

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
nhan
Forum Commoner
Posts: 95
Joined: Sun Feb 27, 2005 8:26 pm
Contact:

Real Time PHP script for ngrep

Post by nhan »

HI,

just wan to inquire if its possible, dont have the knowledge to do so, maybe someone can give me an idea... we have a program running and usually we use "ngrep [search string]" to capture logs on a linux server, is there a way i can do this query using php and create a web-based query for this?

:?:
thanks!

nhan
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Yes, see the manual for functions to execute system commands and load files.

http://www.php.net/manual/en/ref.exec.php

http://www.php.net/manual/en/ref.filesystem.php
(#10850)
User avatar
kyberfabrikken
Forum Commoner
Posts: 84
Joined: Tue Jul 20, 2004 10:27 am

Post by kyberfabrikken »

Remember to be paranoid when routing something from a HTTP request to your shell.
Post Reply