The problem I'm having is that I can't connect to the server that is running the service to even try to post a request to it. Here's what I got:
Code: Select all
switch($_GET['try']) {
case 1:
$fp = fsockopen("https://axis.adin.net", 80, $errno, $errstr, 30);
break;
case 2:
$fp = fsockopen("https://axis.adin.net", 443, $errno, $errstr, 30);
break;
case 3:
$fp = fsockopen("axis.adin.net", 80, $errno, $errstr, 30);
break;
case 4:
$fp = fsockopen("axis.adin.net", 443, $errno, $errstr, 30);
break;
case 5:
$fp = fsockopen("https://axis.adin.net");
break;
}
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$file = file_get_contents("myxml.xml");
$out = "POST /interfaces/loanshield.asmx/PullLoanShield HTTP/1.1\n";
$out .= "Host: axis.adin.net\n";
$out .= "Content-Type: application/x-www-form-urlencoded\n";
$out .= "Content-Length: " . strlen($file) . "\n";
$out .= "strXML=" . $file;
$result = "";
fwrite($fp, $out);
while (!feof($fp)) {
$result .= fgets($fp, 1024);
}
fclose($fp);
echo $result;
}I'm not exactly sure what's going on with it. It seems to want to work when it uses the default TCP protocol, and even when I visit http://axis.adin.net, I get no response from the webserver at all, however if I visit https, it works just fine.