I have it working with the sample.html file they supply. I used the following to integrate it:
http://www.leadingedgescripts.co.uk/hsb ... slinux.php
the problem I have is that it displays the /cgi-bin/CcOrderHash.e page but I want to skip this page and go straight to the HSBC page. How can I do this?
What I dont understand is the bottom part of what this document is talking about and what this code is attempting to do:
Code: Select all
<?php
$postdata = array2String($_POST);
$fp = fsockopen("www.yourdomain.com", 80);
if (!$fp)
{
echo "Couldn't open the connection to OrderHash.e file";
}
else
{
/***************************
|lets build our post request
***************************/
$out = "POST /cgi-bin/OrderHash.e HTTP/1.1\r\n";
$out .= "Host: http://www.yourdomain.com\r\n";
$out .= "Accept:text/xml,application/xml,application/zhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n";
$out .= "Accept-Language: en\r\n";
$out .= "Accept-Encoding: gzip,deflate\r\n";
$out .= "Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n";
$out .= "Keep-Alive: 300\r\n";
//$out .= "Referer: http://www.yourdomain.com/hsbc/sample.html\r\n";
$out .= "Content-Type:application/x-www-form-urlencoded\r\n";
$out .= "Content-Length: ". strlen($postdata) ."\r\n";
$out .= "Connection: close\r\n\r\n";
$out .= $postdata;
/*****************************
|This passes our POST headers
|to the OrderHash.e form
*****************************/
fwrite($fp, $out);
?>How do I use this to read back and submit the CcOrderHash.e page?
Any help would be appreciated. This HSBC CPI is a pain. There instructions are rubbish.