samedi 27 juin 2015

PHP IF statement and looping

I have this php code:

<?php
if(isset($_POST['gen'])){              

$genapi = "http://ift.tt/1xhDfVE";
$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.

Aucun commentaire:

Enregistrer un commentaire