added morre session
This commit is contained in:
@@ -64,8 +64,20 @@ abstract class BaseController extends Controller
|
||||
// if ( session_status() !== PHP_SESSION_ACTIVE ) session_start();
|
||||
}
|
||||
|
||||
public function getIpData(){
|
||||
//$ip_loc="0.0.0.0";
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
$ip_loc = $_SERVER['HTTP_CLIENT_IP'];
|
||||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$ip_loc = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
} else {
|
||||
$ip_loc = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
return $ip_loc;
|
||||
}
|
||||
public function APIcall($method, $url, $data) {
|
||||
// $curl = curl_init();
|
||||
log_message('critical', "***** ***** APIcall:: ****".$url );
|
||||
$curl = curl_init($url);
|
||||
switch ($method) {
|
||||
case "GET":
|
||||
|
||||
Reference in New Issue
Block a user