Hey all, I'm new with PHP so I'm really hoping I can learn a lot here. This is my first post so here goes! 🙂
I found this completely set up, easy to use AIM script that I want to try out and modify. The problem is, I can't get past one of the first conditional blocks in the code. The block says the following:
//If using an unsecure connection exit...
if (!(($HTTP_SERVER_VARS["HTTPS"] == "on") && ($GLOBALS["SERVER_PORT"]==443)))
{
if ((APPLICATIONTYPE == "PRODUCTION") || (APPLICATIONTYPE == "TESTING"))
{
echo "<h3>You are not using a secure connection!</h3>";
echo "It is likely that the URL of HTTP and not HTTPS was used to access this page.<br>";
echo "If you order from ANYONE that does not at the very least use HTTPS, you are taking additional risks.<br>";
echo "HTTP is not a valid secure connection that will encrypt sensitive information like credit card information.";
echo "Please use HTTPS.<br><br>";
echo "<a href='" . PATH_TO_FILES . "/order.php' class='mainlinks'>Click Here for Secure Ordering</a>";
//Terminate the script
exit();
}
else if (APPLICATIONTYPE == "DEVELOPMENT")
{
//Do nothing
}
else
{
exit("Invalid Application Type provided. Exiting...");
}
}
the URL that I'm accessing the form from is https://www.siteguys.com/order/order.php
As you can see, it's telling me that I'm not using a secure connection. I have an SSL certificate on the site and i'm accessing the url via https, so I don't understand where the issue is here? My application type is set to TESTING. When I cut out the conditional block of code, I can access the order form, but obviously that's not what i want to do. Does anyone see something that I don't? Thanks in advance!
On another note, this script is from 2003 (kind of old). Does anyone know of a good PHP based script for the AIM integration that's pretty well documented and easy enough for a basic PHP reader like me to use? Thanks again!
Regards,
Matt