Jump to content

Recommended Posts

Hello PHP freaks.. Can anybody tell me how to terminate shell script after specific interval time while calling it from php using exec() ?

 

In other words suppose i wanna run

$ ngrep -lqi -p -W none ^get\|^post tcp dst port 80

as

<?php

$records = exec("ngrep -lqi -p -W none ^get\|^post tcp dst port 80");

?>

How can I set timer to expire this code after 4-5 seconds ?

 

;) I might be thinking or going to wrong way,, But I am planning to create online protocol analyzer / url sniffer.

 

This code monitors incoming and outgoing GET or POST requests.. I am creating code to sniff video URL from video link. any Idea "?

 

Thanks in Advance..

Link to comment
https://forums.phpfreaks.com/topic/240861-protocol-analyzing-using-php/
Share on other sites

Thanks xyph,

 

      Let me know if killing of process with SGKILL or core dump used in that code is safe for server environment.?. Is there any alternative to do this with any other way rather than PHP or this is hypothetical concept ?

 

Thanks again

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.