I have this php code:
<?php
if(isset($_POST['gen'])){
$genapi = "http://domain.com/api.php";
$result5 = htmlentities(file_get_contents($genapi));
list($first, $last) = explode(':', $result5);
header('Location: minecraft.php?line='.$result5);
}
?>
I am having trouble making it so if "$result5" returns with "no" then to wait 2 seconds then try again but if "$result5" does NOT return with "no" it will run the header line.