Click here to Skip to main content
15,887,446 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
 <pre lang="PHP">$ch = curl_init($url);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:xml','Connection: close','Authorization:LOGIN=test,PASSWORD=f26fc9,REQUEST_GATEWAY_CODE=GW0001,REQUEST_
GATEWAY_TYPE=EXdfgdfgTGW,SERVICE_PORT=15590,SOURCE_TYPE=EdfgdfgXdfgTGW'));
        curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 300);    
	 curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
        curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); 

	 print("Send to BL:<BR>".$xml);

        $data = curl_exec($ch);


is that correct way ??? how i write this type of authorization in php curl plz help
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900