I have a verification system for people that choose remember me. I create a full cookie out of the PHPSESSID and Username. The PHPSESSID is then put in a database with their username and it changes every time they login again to verify the correct user. Basically I want this to run every 5 seconds to check for the cookies. The reason is this is part of an iPhone app that has multiple tabs that allow you to login in either. So if you login on one I want the other to realize it and do the appropriate action. Any help would be loved. Thanks.
<?php
$Username = $_COOKIE['Username'];
if (isset($_COOKIE['Username']) && isset($_COOKIE['PHPSESSID'])) {
echo "<p> </p>";
echo "<center>Login Successful. Please wait for redirect.";
echo '<meta http-equiv="Refresh" content="3;URL=http://www.example.com">';
}
?>