Skip to content

Instantly share code, notes, and snippets.

@CAMIZOCA
CAMIZOCA / gist:2d15393b29e2c53d657e
Created May 26, 2015 20:56
Codigo para timeout
$stringResponse = exec_timeout($caspercall, $timeout = 20);//Timeout in seconds.
/**
* Execute a command and return it's output. Either wait until the command exits or the timeout has expired.
*
* @param string $cmd Command to execute.
* @param number $timeout Timeout in seconds.
/*
* Casperjs - Obtener titulo sitio web
* chevere.pw
*/
var casper = require('casper').create();
casper.start('http://google.com/', function() {
this.echo(this.getTitle());
});
test