61 lines
2.0 KiB
PHP
61 lines
2.0 KiB
PHP
<?php
|
|
|
|
class Testing extends MY_Controller
|
|
{
|
|
var $db_onedev;
|
|
public function index()
|
|
{
|
|
echo "SUB GROUP API";
|
|
}
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->load->helper('url'); // Load URL helper to use current_url() function
|
|
$this->db_onedev = $this->load->database("onedev", true);
|
|
}
|
|
|
|
public function testing()
|
|
{
|
|
$full_url = current_url();
|
|
$payload_length = strlen($payload);
|
|
|
|
echo "<h2>🔍 Uji Panjang URL</h2>";
|
|
echo "<strong>URL:</strong><br><code>$full_url</code><br><br>";
|
|
echo "<strong>Panjang Payload:</strong> $payload_length karakter<br><br>";
|
|
|
|
if ($payload_length > 0) {
|
|
echo "<strong>Payload:</strong><br><code>$payload</code><br><br>";
|
|
} else {
|
|
echo "Belum ada payload. Tambahkan karakter di akhir URL untuk menguji panjang.";
|
|
}
|
|
|
|
echo "<hr><small>Generated at: " . date('Y-m-d H:i:s') . "</small>";
|
|
}
|
|
public function url()
|
|
{
|
|
$full_url = current_url() . '?' . $_SERVER['QUERY_STRING'];
|
|
|
|
// Ambil semua parameter, PCODE pakai $_GET langsung supaya tidak terfilter
|
|
$report = $this->input->get('__report');
|
|
$format = $this->input->get('__format');
|
|
$pid = $this->input->get('PID');
|
|
$pcode = isset($_GET['PCODE']) ? $_GET['PCODE'] : '';
|
|
$username = $this->input->get('username');
|
|
$tm = $this->input->get('tm');
|
|
|
|
// Tampilkan hasil
|
|
echo "🔍 Uji Panjang & Struktur URL\n";
|
|
echo "Full URL:\n$full_url\n\n";
|
|
echo "Panjang URL: " . strlen($full_url) . " karakter\n\n";
|
|
echo "Parameter Diterima:\n";
|
|
echo "__report: $report\n";
|
|
echo "__format: $format\n";
|
|
echo "PID: $pid\n";
|
|
echo "PCODE: $pcode\n";
|
|
echo "username: $username\n";
|
|
echo "tm: $tm\n";
|
|
echo "\n---\nGenerated at: " . date('Y-m-d H:i:s') . "\n";
|
|
}
|
|
|
|
}
|