PHP and several POSTs
Posted: Thu Nov 27, 2008 3:41 am
Hi there!
I have an Apache HTTPD reverse proxy solution which integrates several intranet services under a single extranet login. I'm currently executing the automatic login in the intranet services using HTTP POSTs. For example, with SquirrelMail I have:
This successfully logs in and automatically presents the user with the SquirrelMail mailbox. The problem happens with another service, a legacy one built on IIS. There are some glitches between HTTPD and IIS, which result in occasional HTTP errors 502. The solution seems to upgrade to the latest HTTPD version, which is out of question in this project for now. The user can overcome the problem by pressing the refresh button a few times...
My question is: is it possible to simulate this refresh on server-side with PHP? That is, I would make the POST in PHP until I don't get a 502 error (with a possible delay between each try), and then present the user with the same page he would get if there wasn't any error.
Thank you very much for your attention, cheers,
AP
I have an Apache HTTPD reverse proxy solution which integrates several intranet services under a single extranet login. I'm currently executing the automatic login in the intranet services using HTTP POSTs. For example, with SquirrelMail I have:
Code: Select all
<form action="https://service.extranet.com/webmail/src/redirect.php" method="post" name="hform">
<input type="hidden" name="login_username" value="<?php echo $username; ?>"/>
<input type="hidden" name="secretkey" value="<?php echo $password; ?>"/>
</form>
<script type="text/javascript" language="javascript">
document.hform.submit();
</script>My question is: is it possible to simulate this refresh on server-side with PHP? That is, I would make the POST in PHP until I don't get a 502 error (with a possible delay between each try), and then present the user with the same page he would get if there wasn't any error.
Thank you very much for your attention, cheers,
AP