- strpos: documentation ( source)
<?php
$your_crazy_input = "flag";
if(isset($your_crazy_input)) {
$position =strpos($your_crazy_input, "flag");
$length = strlen($your_crazy_input);
echo $position;
echo "\n";
echo $length;
echo "\n";
echo $position !== false;
if($position !== false && $length < 4) {
echo $flag;
}
else {
echo "Oh Sorry.. This isn't a crazy input.";
}
}