I used this time to connect to a bank account, hope this helps:
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, HSBC_LINK1); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 1); $post_data = array('post1' => 'value'); $fields_string = ''; foreach($post_data as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } $fields_string = rtrim($fields_string,'&'); curl_setopt($ch, CURLOPT_POST, count($post_data)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); curl_setopt($ch, CURLINFO_HEADER_OUT, true); $data1 = curl_exec($ch);
source share