<?php $files = [ 'Hakim_123.txt', 'Mick_MacKusa.jpg', 'henry_rollins.gif', 'Z_zzz_zzz_zzz.csv' ]; $_GET['postname'] = 'H'; if (!preg_match('~^[A-Z]$~', $_GET['postname'] ?? '')) { exit('Stop trying to hack my scripts'); } exit( json_encode( array_values( array_unique( preg_filter( '~^' . strtolower($_GET['postname']) . '[^_]*\K_.*~', '', array_map('strtolower', $files) ) ) ) ) );
You have javascript disabled. You will not be able to edit any code.