added morre session

This commit is contained in:
CHIEFSOFT\ameye
2024-11-17 18:52:59 -05:00
parent ca1abb4f2a
commit 90f6c2b201
3 changed files with 23 additions and 2 deletions
+12
View File
@@ -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":