Forum Moderators: coopster
I'm working on hsbc epayments.
I'm trying to emulate a payment processing session without leaving my server (so my shop basket looks seamless).
I can initiate the session using fsockopen and connecting to their secure server.
This sends back the html for their welcome screen as I would expect.
It also sets a cookie in their header response so I get-
HTTP/1.1 200 OK Server: computer Date: Wed, 06 Jul 2005 12:34:45 GMT Content-type: text/html; charset=ISO-8859-1 Pragma: no-cache Cache control: no-cache Expires: 0 Set-cookie: JSESSIONID=C810EC618792168649109D2A9A86C5A9;Path=/;Secure Connection: close
<html>etc.
So I parse this information and get what I need.
The next stage is to call the same script with the information that I parsed from above (just a hidden form variable) but now the form has a name :
<form name="cpi_welcome" action="servlet" ..>
Which I guess the script is using to establish the action to take, but I can't find how to pass this to the server via my connection - is not actually in the POST vars or indeed any request variables I can see.
Ofcourse this may be a red-herring and I might need to maintain the session across my connections (I disconnect and reconnnect for every POST emulation) so I might need to send the cookie variable again.
Any thoughts on this would be greatly appreciated.
Cheers,
Lee
Edit:
http://www.php.net/manual/en/ref.curl.php [php.net]