Maintenance mode
Thank you for your patience!
function fetch_stock_data() { $output = shell_exec('python3 fetch_stocks.py'); if ($output === null) { error_log("Python script did not execute properly."); return false; } $data = json_decode($output, true); if (json_last_error() !== JSON_ERROR_NONE) { error_log("JSON decode error: " . json_last_error_msg()); error_log("Python script output: " . $output); return false; } return $data; } function display_stock_screener() { $stocks = fetch_stock_data(); if (!$stocks) { return "Error fetching stock data. Check the error log for details."; } // Build HTML output $output = "
| Symbol | Price | Volume | Gap |
|---|---|---|---|
| {$stock['symbol']} | "; $output .= "{$stock['price']} | "; $output .= "{$stock['volume']} | "; $output .= "{$stock['gap']} | "; $output .= "
Thank you for your patience!