My php days are very young... I hope this will make sense.
I have been using a script for a while that stores webhosting orders until they have been approved and then interfaces with another script (Web Host Manager) to create the account.
I've switched web servers, and the only difference between the new one from the old one is that the new one only allows you to connect to the script via secure connectionss (only connects though https://... not http://)
Would this mean I would need to make any changes to the section of the ordering script that builds the header? This is what I have right now:
$decrypt = base64_decode(decrypt(base64_decode($whm_string), "my password is really cool and it is " . $pass));
$header = "POST /scripts/wwwacct HTTP/1.0\r\nAuthorization: Basic ";
$header .= base64_encode($decrypt) . "\r\n";
$header .= "Content-type: application/x-www-form-urlencoded\r\n";
$header .= "Content-length: " . strlen($request) . "\r\n";
$header .= "Connection: close\r\n\r\n";
$fp = fsockopen($whm_server, 2087, $errno, $errstr);
if ($fp) {
fputs($fp, $header . $request);
while (!feof($fp)) {
$response .= fgets($fp, 128);
}
}
$fp = fclose($fp);
return $response;
}
Anything in the header that I should change?
$errno and $errstr do not return any values (I've tired to echo the values when debuging/trouble shooting)
I've also tried using fopen() instead of fsocketopen(), but my limited knowledge doesn't help me with the rest of the script.
Any help from the pros here would be greatly appreciated. The entire script can be found @ http://www.nixt.org