public function call($command, array $options = array())
	{
		$curl = curl_init();
		$options[CURLOPT_URL] = $this->server().$command;
		$options[CURLOPT_RETURNTRANSFER] = TRUE;
		$options[CURLOPT_FOLLOWLOCATION] = TRUE;
		$options[CURLOPT_HTTPHEADER] = array(
			'Content-Type: application/json;charset=UTF-8',
			'Accept: application/json',
		);

		curl_setopt_array($curl, $options);

		$raw = trim(curl_exec($curl));

		$result = json_decode($raw, TRUE);

		$error = curl_error($curl);

		curl_close($curl);

		if ($error)
			throw new Exception_Driver('Curl ":command" throws exception :error', array(':command' => $command, ':error' => $error));

		if ($result['status'] == 10)
			throw new Exception_Staleelement();

		if ($result['status'] != 0)
			throw new Exception_Selenium($result['status']);

		return $result['value'];
	}
public function call($command, array $options = array())
	{
		$curl = curl_init();
		$options[CURLOPT_URL] = $this->server().$command;
		$options[CURLOPT_RETURNTRANSFER] = TRUE;
		$options[CURLOPT_FOLLOWLOCATION] = TRUE;
		$options[CURLOPT_HTTPHEADER] = array(
			'Content-Type: application/json;charset=UTF-8',
			'Accept: application/json',
		);

		curl_setopt_array($curl, $options);

		$raw = trim(curl_exec($curl));

		$result = json_decode($raw, TRUE);

		$error = curl_error($curl);

		curl_close($curl);

		if ($error)
			throw new Exception_Driver('Curl ":command" throws exception :error', array(':command' => $command, ':error' => $error));

		if ($result['status'] == 10)
			throw new Exception_Staleelement();

		if ($result['status'] != 0)
			throw new Exception_Selenium($result['status']);

		return $result['value'];
	}
public function call ( $ command , array $ options = array ( ) ) { $ curl = curl_init ( ) ; $ options [ CURLOPT_URL ] = $ this -> server ( ) . $ command ; $ options [ CURLOPT_RETURNTRANSFER ] = TRUE ; $ options [ CURLOPT_FOLLOWLOCATION ] = TRUE ; $ options [ CURLOPT_HTTPHEADER ] = array ( 'Content-Type: application/json;charset=UTF-8' , 'Accept: application/json' , ) ; curl_setopt_array ( $ curl , $ options ) ; $ raw = trim ( curl_exec ( $ curl ) ) ; $ result = json_decode ( $ raw , TRUE ) ; $ error = curl_error ( $ curl ) ; curl_close ( $ curl ) ; if ( $ error ) throw new Exception_Driver ( 'Curl ":command" throws exception :error' , array ( ':command' => $ command , ':error' => $ error ) ) ; if ( $ result [ 'status' ] == 10 ) throw new Exception_Staleelement ( ) ; if ( $ result [ 'status' ] != 0 ) throw new Exception_Selenium ( $ result [ 'status' ] ) ; return $ result [ 'value' ] ; }
Perform a request to the selenium server, using curl
@param  string $command
@param  array  $options curl options
@return mixed
Perform a request to the selenium server using curl