Skip to content

Commit

Permalink
Finished
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenanhung committed Aug 2, 2024
1 parent 8d66bdb commit 29ccf64
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/controllers/Welcome.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

defined('BASEPATH') or exit('No direct script access allowed');

/**
Expand Down Expand Up @@ -26,7 +27,8 @@ public function index(): void
],
'request' => [
'ip' => getIPAddress(),
'user_agent' => $this->input->user_agent(true)
'user_agent' => $this->input->user_agent(true),
'php_version' => PHP_VERSION
]
];
$this->output
Expand All @@ -39,7 +41,9 @@ public function index(): void

public function ip(): void
{
$this->output->set_status_header()->set_content_type('application/json', 'utf-8')->set_output(getIpInformation())->_display();
$this->output->set_status_header()->set_content_type('application/json', 'utf-8')->set_output(
getIpInformation()
)->_display();
exit;
}

Expand Down

0 comments on commit 29ccf64

Please sign in to comment.