function sendReport($token, $profileId, $mail, $subject, $message, $initDate, $endDate) { $link = geoRefLink() . "/SafeGuard_Composition/CreatePDFProfile"; $link = $link . "?token=" . $token; $link = $link . "&profileID=" . $profileId; $link = $link . "&destinationEmail=" . $mail; $link = $link . "&subject=" . $subject; $link = $link . "&message=" . $message; $link = $link . "&initDate=" . $initDate; $link = $link . "&endDate=" . $endDate; $ch = curl_init(); $curlConfig = array(CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_URL => $link, CURLOPT_RETURNTRANSFER => false, CURLOPT_SSLVERSION => 3, CURLOPT_SSL_VERIFYPEER => FALSE, CURLOPT_SSL_VERIFYHOST => FALSE, CURLOPT_VERBOSE => TRUE, CURLOPT_CERTINFO => TRUE); curl_setopt_array($ch, $curlConfig); //apenas executar n necessitamos do resultado $result = curl_exec($ch); file_put_contents("sendReport", curl_getinfo($ch, CURLINFO_HTTP_CODE) . "\n"); //$result = curl_getinfo($ch, CURLINFO_HTTP_CODE); //echo close curl_close($ch); //file_put_contents("getValidEvents_curl_getinfo", $result."\n" ); return $result; }
function removeFence($token, $profileID, $fenceID) { ini_set("soap.wsdl_cache", "0"); ini_set("soap.wsdl_cache_enabled", "0"); $wsdl = geoRefLink() . '/GeoreferencingService/Georeferencing?WSDL'; $sslOpts = array('ssl' => array('ciphers' => 'RC4-SHA')); $soapclient_options = array(); $soapclient_options["verify_peer"] = false; $soapclient_options["verify_host"] = false; $soapclient_options["allow_self_signed"] = true; $soapclient_options["stream_context"] = stream_context_create($sslOpts); //var_dump($token); try { $client = new SoapClient($wsdl, $soapclient_options); } catch (SoapFault $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } //$options = array(new SoapParam("token", $token), new SoapParam("childUserID", $profileID)); $params = array("token" => $token, "childUserID" => $profileID, "fenceID" => $fenceID); try { $client->removeFence($params); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } return; }