( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/../tmpr/../tmpr/../tmpr/..//tmpr/../looksy/test_api.php
<?php
// Test API get_models response
$url = 'http://localhost/looksy/api/virtual_dress.php';
$data = ['action' => 'get_models'];

$options = [
    'http' => [
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data)
    ]
];
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

echo "Response from get_models:\n";
echo $result;

// Parse and check IDs
$json = json_decode($result, true);
if ($json && isset($json['models'])) {
    echo "\n\nFirst model ID: " . $json['models'][0]['id'] . "\n";
    echo "Type of ID: " . gettype($json['models'][0]['id']) . "\n";
}
?>