Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $stores;
- $xmlStores = new SimpleXMLElement($stores);
- foreach($xmlStores as $store) {
- if ($store->id == STORE_ID){
- $storeWebAddress = $store->webaddress."/volantews/api";
- $storeWebAddressPort = $store->port;
- }
- }
- $ch = curl_init($storeWebAddress);
- curl_setopt( $ch, CURLOPT_POST, 1 );
- //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $xmlRequest );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
- curl_setopt( $ch, CURLOPT_TIMEOUT, 240 );
- curl_setopt($ch, CURLOPT_PORT, $storeWebAddressPort);
- $xmlResponse = curl_exec( $ch );
- curl_close($ch);
- if($xmlResponse) {
- return $xmlResponse;
- }
- else{
- $conf['type'] = "Content-Type:text/html";
- return "err";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement