This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Elastic Search Adapter for Tacticlicks Data Warehouse | |
* @Author: Jak Giveon | |
* | |
* This class wraps all RedBean PHP functions, adding ElasticSearch functionality where it is useful | |
* Please note that this class is meant to MOSTLY be called statically, just like RedBean for PHP | |
*/ | |
class E { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP_REQUEST Object | |
( | |
[connection_status] => 1 | |
[mime] => text/html | |
[total_time] => 0.337265 | |
[redirects] => 0 | |
[headers] => Array | |
( | |
[date] => Sun, 02 Oct 2016 15:27:19 GMT | |
[server] => Apache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_client_ip() { | |
switch ( true ) { | |
case ( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ): | |
$ip = $_SERVER['HTTP_CF_CONNECTING_IP']; | |
break; | |
case ( isset( $_SERVER['HTTP_INCAP_CLIENT_IP'] ) ): | |
$ip = $_SERVER['HTTP_INCAP_CLIENT_IP']; |