ratcateme Posted February 22, 2008 Share Posted February 22, 2008 i am trying to make a page that will handle logins to my webmail script i want the script to display Loading your Mail... while it loads the next page because it takes a while here is my code <?php include('conf.php'); session_start(); if(isset($_POST['username']) && isset($_POST['password'])){ include('includes/POP3.php'); $pop3=new Net_POP3; $pop3->connect($conf['pop3']['host'],$conf['pop3']['port']); if($pop3->login($_POST['username'],$_POST['password'])){ $_SESSION['username']=$_POST['username']; $_SESSION['password']=$_POST['password']; echo ' <html> <head> </head> <body> <h1>Loading your Mail...</h1> <script type="text/javascript"> function int(){ window.location = "int.php"; } setTimeout(int(), 10000); </script> </body> </html>'; } $pop3->disconnect(); exit(); } ?> At the moment it use a javascript redirect but i doesn't work properly it just loads the page as soon as it loads and doesn't display the loading message. i want to know if there is a way i can create a redirect like this in php and still display the loading text (the 10000 is just to test but it has no effect??) Scott. Quote Link to comment Share on other sites More sharing options...
vicodin Posted February 22, 2008 Share Posted February 22, 2008 Why do you want it to do that ... its a waste of bandwidth and time... Unless they have 10,000 mails it should load rather quickly. Quote Link to comment Share on other sites More sharing options...
ratcateme Posted February 22, 2008 Author Share Posted February 22, 2008 my server is REALLY slow and takes ages to access the pop3 socket. i have solved this with a <meta> tag anyway but any other help would be useful to do this in php. Scott. Quote Link to comment Share on other sites More sharing options...
vicodin Posted February 22, 2008 Share Posted February 22, 2008 Gotcha... Im working on a few things...let you know what i come up with... didnt mean to be a dick or anything before Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.