php-pcntl

PHP - What are the best/popular libraries for developing CLI apps/scripts?

Many of the component libraries and toolkits I'm familiar with lack CLI-specific libraries (zend, kohana, etc..). Are there any libraries/tools that are designed specifically for developing CLI application (such as an abstraction of php's multi-threading library, pcntl/posix)? ...

PHP: Can pcntl_alarm() and socket_select() peacefully exist in the same thread?

I have a PHP CLI script mostly written that functions as a chat server for chat clients to connect to (don't ask me why I'm doing it in PHP, thats another story haha). My script utilizes the socket_select() function to hang execution until something happens on a socket, at which point it wakes up, processes the event, and waits until t...

pcntl_fork() function question

Goodmorning stackoverflow, I'm still busy with my webcrawler and i just need some last help. Because crawling the web can cost a lot of time I want to let pcntl_fork() help me in creating multiple childs to split my code in parts. Master - crawling the domain Child - When receiving a link child must crawl the link found on the domain ...

Long PHP SOAP process

I've been working on a website that get all its data through SOAP. Some pages may have three or four calls to the soap server and some of the calls can sometimes take quite long (30-60 seconds). What I've noticed happening is if I interrupt the request during one of the long 30 second calls (stop the browser loading) and issue another ...

shell_exec phpfile

Atmoment i use this code: if(isset($_POST['url']) && isset($_POST['trefwoorden']) ) { mysql_connect('localhost', 'crawler', 'whathasbeenseencannotbeunseen'); mysql_select_db("crawler"); mysql_query("INSERT INTO jobs (jobID, url, trefwoorden) VALUES ('', '".$_POST['url']."', '".$_POST['trefwoorden']."')"); $output = shell_exec("....