fsockopen for url changed to SSL
<p>We have a PHP checkout script, which posts information to a third-party payment gateway using XML.</p>

<p>The problem is, we used to POST using regular port 80, but they have now changed URLs and are now SSL.</p>

<p>We can post the data no problem to their server, the problem is loading and checking this information back into our database.</p>

<p>After the XML vars definition, we have:</p>

<pre><code>if (((int)$_SESSION['value_dollars']+(int)$_SESSION['value_cents']) != 0){
$response = openSocket($host, $vars);

$xmlres = array();
$xmlres = makeXMLTree ($response);

if (trim($xmlres[SecurePayMessage][Payment][TxnList][Txn][approved]) == 'Yes'){
</code></pre>

<p>The problem is that it does not seem to load any $xmlres into the system, so when we check for approved = yes, it always reverts to the error page.</p>

<p>Since they have changed to SSL etc how can we rewrite this section to be accurate?</p>
